public interface File extends ResourceItem
Modifier and Type | Method and Description |
---|---|
File |
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.
|
boolean |
download(android.content.Context context,
java.lang.String downloadPath)
Downloads a file from user's cloud storage account.
|
java.lang.String |
getChecksum() |
java.lang.String |
getCreationDate() |
java.lang.String |
getItemuid() |
java.lang.String |
getLocationCountry() |
java.lang.String |
getLocationCountryCode() |
java.lang.String |
getLocationCounty() |
java.lang.String |
getLocationLocality() |
java.lang.String |
getLocationPostalCode() |
java.lang.String |
getLocationRegion() |
java.lang.String |
getLocationStreet() |
java.lang.String |
getMimeType() |
java.lang.String |
getModificationDate() |
int |
getPriority() |
java.lang.String |
getSource() |
java.lang.String |
getTags() |
boolean |
getThumbnailToStream(android.content.Context context,
java.io.OutputStream outputStream)
Downloads a thumbnail to the output stream.
|
boolean |
getThumbnailToStream(android.content.Context context,
java.io.OutputStream outputStream,
int height,
int width)
Downloads a resized thumbnail to the output stream.
|
boolean |
getThumbnailToStream(android.content.Context context,
java.io.OutputStream outputStream,
ThumbnailSize size)
Downloads a thumbnail to the output stream.
|
java.lang.String |
getTimelineDate() |
boolean |
isDeleted() |
boolean |
isFavorite() |
File |
move(android.content.Context context,
java.lang.String target,
java.lang.Boolean safe,
java.lang.String conflictSolve)
Move a file or a folder.
|
File |
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.
|
getContentToken, getExtension, getName, getParentPath, getSize, getUri, getVersion, getVersionCreated
java.lang.String getMimeType()
java.lang.String getChecksum()
getChecksum
in interface ResourceItem
java.lang.String getCreationDate()
boolean isFavorite()
boolean isDeleted()
java.lang.String getLocationStreet()
java.lang.String getLocationLocality()
java.lang.String getLocationCounty()
java.lang.String getLocationCountry()
java.lang.String getLocationRegion()
java.lang.String getLocationPostalCode()
java.lang.String getLocationCountryCode()
java.lang.String getModificationDate()
int getPriority()
java.lang.String getSource()
java.lang.String getTags()
java.lang.String getTimelineDate()
java.lang.String getItemuid()
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.File 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.File
object populated with file informationFile 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:File
object populated with file informationFile 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.File
object populated with file informationboolean download(android.content.Context context, java.lang.String downloadPath)
downloadPath
location.
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objectdownloadPath
- Intended destination directory path.CloudAPIException
will be thrown if the request cannot be processed.boolean getThumbnailToStream(android.content.Context context, java.io.OutputStream outputStream)
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objectoutputStream
- output stream where thumbnail bytes are intended to be written.CloudAPIException
will be thrown if the request cannot be processed.boolean getThumbnailToStream(android.content.Context context, java.io.OutputStream outputStream, int height, int width)
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objectoutputStream
- output stream where thumbnail bytes are intended to be written.height
- Intended height of resized thumbnail.width
- Intended width of resized thumbnail.CloudAPIException
will be thrown if the request cannot be processed.boolean getThumbnailToStream(android.content.Context context, java.io.OutputStream outputStream, ThumbnailSize size)
ThumbnailSize
provided in the argument.
CloudAPIException
will be thrown with an error code CloudAPIException.ErrorCode#USER_UNAUTHORIZED
if user is not authorized to perform this operation.context
- Context
objectoutputStream
- output stream where thumbnail bytes are intended to be written.size
- Size of thumbnail to be downloaded as defined in ThumbnailSize
.
CloudAPIException
will be thrown if the request cannot be processed.