Greetings. I am developing an application that uses Nirvanix as the back end to an already existing backup application.
The sequence of event is:
1. Create Nirvanix directory. Done using the root folder from Session.
- IE Folder f = Sesssion.GetFolder("/",1,500, 0,false) .
- f.CreateFolders(new string [] { foldername});
This returns with no error (no exception)
2. Write data into temporary name in directory (done using httpupload ).
This is a custom method I implemented (cloned from existing SDK code),
- string path = "/tmp/uploaddir";
- string name = "junk.tmp";
- string fullpath = "/tmp/uploaddr/junk.tmp";
- Uploader uploader = m_session.GetFileUploader(dirpath);
- uploader.PerformHTTPUploadFromStream(name, fullpath , stream) ;
This also returns without error.
Finally, it's time to rename the file to the proper name:
- string newname = "therealname.txt";
- IMFS myimfs = new IMFS();
- mymfs.RenameFile(m_sessiontoken, fullpath, newname);
This works about 99% of the time on a slow connecton and about 90% of the time on a fast connection.
The exception thrown is always "Invalid path", as if the remote directory does not exist.
Am I doing something obviously wrong?
Thanks,
JP