TrashModule
public class TrashModule
Module for trash management
-
Gets the files, folders and web links that are in the user’s trash.
Declaration
Swift
public func listItems( offset: Int? = nil, limit: Int? = nil, fields: [String]? = nil ) -> OffsetPaginationIterator<FolderItem>Parameters
offsetThe offset of the item at which to begin the response. See offset-based paging for details.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
fieldsString array of fields to include in the response.
-
Get a file that has been moved to the trash.
Declaration
Parameters
idThe identifier of file
fieldsString array of fields to include in the response.
completionReturns a file response object if successful otherwise a BoxSDKError.
-
Get a folder that has been moved to the trash.
Declaration
Parameters
idThe identifier of folder
fieldsString array of fields to include in the response.
completionReturns a folder response object if successful otherwise a BoxSDKError.
-
Get a web link that has been moved to the trash.
Declaration
Parameters
idThe identifier of web link
fieldsString array of fields to include in the response.
completionReturns a web link response object if successful otherwise a BoxSDKError.
-
Restores a file that has been moved to the trash.
Declaration
Parameters
idThe identifier of file
nameThe new name for this file. Only used if file can’t be restored with its previous name due to a conflict.
parentFolderIdThe ID of the new parent folder. Only used if the previous parent folder no longer exists or the user doesn’t have permission to restore the file there.
fieldsString array of fields to include in the response.
completionReturns a file response object if successful otherwise a BoxSDKError.
-
Restores a folder that has been moved to the trash.
Declaration
Parameters
idThe identifier of folder
nameThe new name for this folder. Only used if folder can’t be restored with its previous name due to a conflict.
parentFolderIdThe ID of the new parent folder. Only used if the previous parent folder no longer exists or the user doesn’t have permission to restore the folder there.
fieldsString array of fields to include in the response.
completionReturns a folder response object if successful otherwise a BoxSDKError.
-
Restores a web link that has been moved to the trash.
Declaration
Parameters
idThe identifier of web link
nameThe new name for this web link. Only used if the web link can’t be restored with its previous name due to a conflict.
parentFolderIdThe ID of the new parent folder. Only used if the previous parent folder no longer exists or the user doesn’t have permission to restore the web link there.
fieldsString array of fields to include in the response.
completionReturns a web link response object if successful otherwise a BoxSDKError.
-
Permanently delete a file that is in the trash. The file will no longer exist in Box. This action cannot be undone.
Declaration
Swift
public func permanentlyDeleteFile( id: String, completion: @escaping Callback<Void> )Parameters
idThe identifier of file
completionReturns a success or a BoxSDKError.
-
Permanently delete a folder that is in the trash. The folder will no longer exist in Box. This action cannot be undone.
Declaration
Swift
public func permanentlyDeleteFolder( id: String, completion: @escaping Callback<Void> )Parameters
idThe identifier of folder
completionReturns a success or a BoxSDKError.
-
Permanently delete a web link that is in the trash. The web link will no longer exist in Box. This action cannot be undone.
Declaration
Swift
public func permanentlyDeleteWebLink( id: String, completion: @escaping Callback<Void> )Parameters
idThe identifier of web link
completionReturns a success or a BoxSDKError.
TrashModule Class Reference