Discuss this help topic in SecureBlackbox Forum

Clouds: Delete file

To delete a file use TElBoxDataStorageObject.Delete() method.


TElOneDriveFile file = storage.AcquireObject(@"...") as TElOneDriveFile;
Console.WriteLine("File: {0} ({1}, size = {2})",
                 file.Name, file.ObjectType, file.Size);

As a result of the call to Delete() method the file on the server will be moved to Trash, and TElBoxFile object will be released, i.e. after deletion operation you should not access this object's methods and properties anymore.

Note, that the attempt to call TElBoxDataStorage.AcquireFile() with the ID of the removed file will cause EElBoxServerError exception with "trashed" error code. To obtain the object for the deleted file use AcquireTrashedFile() method.

How To articles about Box.com cloud

Discuss this help topic in SecureBlackbox Forum