public interface Folder extends ResourceItem
Modifier and Type | Method and Description |
---|---|
ItemList<Folder> |
copy(android.content.Context context,
java.lang.String target,
java.lang.Boolean safe,
java.lang.String conflictSolve,
java.lang.String override)
Creates a copy of a file or folder.
|
boolean |
delete(android.content.Context context,
java.lang.Boolean purge)
Deletes a folder/file from user's cloud storage account at the path specified in the argument.
|
java.lang.String |
getModificationDate() |
java.lang.String |
getSource() |
boolean |
isDeleted() |
boolean |
isFavorite() |
boolean |
isRootBackupFolder() |
ItemList<Folder> |
move(android.content.Context context,
java.lang.String target,
java.lang.Boolean safe,
java.lang.String conflictSolve)
Move a file or a folder.
|
ItemList<Folder> |
rename(android.content.Context context,
java.lang.String target,
java.lang.Boolean safe,
java.lang.String conflictSolve)
Rename a file/folder stored under user's cloud storage account.
|
getChecksum, getContentToken, getExtension, getName, getParentPath, getSize, getUri, getVersion, getVersionCreated
boolean isFavorite()
boolean isDeleted()
java.lang.String getModificationDate()
java.lang.String getSource()
boolean isRootBackupFolder()
boolean delete(android.content.Context context, java.lang.Boolean purge)
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objectpurge
- If set to true, deletes the file or folder. If not set, the default is false.CloudAPIException
will be thrown if the request cannot be processed.ItemList<Folder> move(android.content.Context context, java.lang.String target, java.lang.Boolean safe, java.lang.String conflictSolve)
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objecttarget
- Cloud path where the folder/file has to be moved to.safe
- If set to true, ensures that name conflicts are resolved according to the value of the conflictSolve parameter. Defaults to false, in which case the operation overwrites an existing file or folder of the same name. Set null for default.conflictSolve
- Defines how name conflicts are resolved if the safe parameter is set to true. If set to copy, a new file is written to the destination folder with a non-conflicting name. If not set, the operation is rolled back and returns 409 Conflict error message.ItemList
- list of files and folders from the target path, populated with the MetadataItem
as a list item. Call ItemList.close()
when the list is no longer needed. CloudAPIException
will be thrown if the request cannot be processed.ItemList<Folder> copy(android.content.Context context, java.lang.String target, java.lang.Boolean safe, java.lang.String conflictSolve, java.lang.String override)
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
object
target
- Cloud path where the folder/file has to be copied to.
safe
- If set to true, ensures that name conflicts are resolved according to the value of the conflictSolve parameter. Defaults to false, in which case the operation overwrites an existing file or folder of the same name. Set null for default.
conflictSolve
- Defines how name conflicts are resolved if the safe parameter is set to true. If set to copy, a new file is written to the destination folder with a non-conflicting name. If not set, the operation is rolled back and returns 409 Conflict error message.
override
- Specifies what happens when a folder of the same name already exists at the specified path:ItemList
- list of files and folders from the target path, populated with the MetadataItem
as a list item. Call ItemList.close()
when the list is no longer needed. CloudAPIException
will be thrown if the request cannot be processed.ItemList<Folder> rename(android.content.Context context, java.lang.String target, java.lang.Boolean safe, java.lang.String conflictSolve)
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objecttarget
- Full path of the target file or folder for copy, move, or rename operations. In case of files, the full or changed name should be included in the target.safe
- If set to true, ensures that name conflicts are resolved according to the value of the conflictSolve parameter. Defaults to false, in which case the operation overwrites an existing file or folder of the same name. Set null for default.conflictSolve
- Defines how name conflicts are resolved if the safe parameter is set to true. If set to copy, a new file is written to the destination folder with a non-conflicting name. If not set, the operation is rolled back and returns 409 Conflict error message.ItemList
- list of files and folders from the target path, populated with the MetadataItem
as a list item. Call ItemList.close()
when the list is no longer needed. CloudAPIException
will be thrown if the request cannot be processed.