Skip to main content

TdxCloudStorageItem.RestoreFromTrash Method

Restores the online resource from the “Trash” special folder.

Declaration

procedure RestoreFromTrash; virtual;

Remarks

Call this procedure to move the file or folder corresponding to the current metadata container from the “Trash” special folder to the original position in the resource hierarchy stored on the connected cloud storage’s server. If the current online resource is a non-empty folder, the RestoreFromTrash procedure also restores every nested file and folder at all nesting levels. The restore operation can take a noticeable amount of time depending on the restored resource count. If the resource is not within the “Trash” folder (that is, the Trashed property returns False), a RestoreFromTrash procedure call produces no effect.

Calling the MoveToTrash or RestoreFromTrash procedure raises an exception if the current online resource does not support these operations. For instance, a special or root folder cannot be within the “Trash” folder. Refer to the descriptions of the RestoreFromTrash procedure implementations provided by TdxCloudStorageItem class descendants for additional information.

Note

A single RestoreFromTrash procedure call sends only a single resource restore operation request to the connected cloud file storage’s server regardless of the nested resource count if the restored resource is a non-empty folder. The cloud storage component raises the OnItemRestoredFromTrash event for every successful file or folder restore request. If a RestoreFromTrash procedure call results in an error, the OnError event occurs instead.

See Also