Skip to main content

TdxCloudStorage.MoveFolderToTrash(TdxCloudStorageFolder) Method

Moves the specified cloud storage folder to the “Trash” special folder.

Declaration

procedure MoveFolderToTrash(AFolder: TdxCloudStorageFolder);

Parameters

Name Type Description
AFolder TdxCloudStorageFolder

A metadata container that corresponds to the target folder.

Remarks

This procedure moves every nested file and folder at all nesting levels to the trash. The trash operation can take a noticeable amount of time depending on the total resource count. If the target folder is already within the “Trash” folder (that is, the folder’s Trashed property returns True), a MoveToTrash procedure call has no effect.

A MoveToTrash procedure call raises an exception if the specified folder does not support this operation. For instance, you cannot place a special or root folder in the “Trash” folder.

Note

The MoveToTrash procedure always runs in the same thread from which it was invoked. A single MoveToTrash procedure call sends only a single resource trash operation request to the connected cloud file storage’s server regardless of the nested resource count if the moved folder is not empty. The cloud storage component raises the OnItemMovedToTrash event for every successful file or folder trash request. If a MoveToTrash procedure call results in an error, the OnError event occurs instead.

See Also