public interface IFile extends IBaseData
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(FileDescriptor descriptor)
Determine whether the current file/folder can be read from.
|
boolean |
canWrite(FileDescriptor descriptor)
Determine whether the current file/folder can be written to.
|
void |
create(FileDescriptor descriptor,
IFileResultCallback callback)
Creates a file with the specified name.
|
boolean |
delete(FileDescriptor descriptor,
boolean cascade)
Deletes the given file or path.
|
boolean |
exists(FileDescriptor descriptor)
Check whether the file/path exists.
|
void |
getContent(FileDescriptor descriptor,
IFileDataLoadResultCallback callback)
Loads the content of the file.
|
IFileSystemStorageType |
getFileStorageType(FileDescriptor descriptor)
Returns the file storage type of the file
|
IFileSystemType |
getFileType(FileDescriptor descriptor)
Returns the file type
|
IFileSystemSecurity |
getSecurityType(FileDescriptor descriptor)
Returns the security type of the file
|
boolean |
isDirectory(FileDescriptor descriptor)
Check whether this is a path of a file.
|
void |
listFiles(FileDescriptor descriptor,
IFileListResultCallback callback)
List all the files contained within this file/path reference.
|
void |
listFilesForRegex(FileDescriptor descriptor,
java.lang.String regex,
IFileListResultCallback callback)
List all the files matching the speficied regex filter within this file/path reference.
|
boolean |
mkDir(FileDescriptor descriptor,
boolean recursive)
Creates the parent path (or paths, if recursive) to the given file/path if it doesn't already exist.
|
void |
move(FileDescriptor source,
FileDescriptor destination,
boolean createPath,
boolean overwrite,
IFileResultCallback callback)
Moves the current file to the given file destination, optionally overwriting and creating the path to the
new destination file.
|
void |
setContent(FileDescriptor descriptor,
byte[] content,
IFileDataStoreResultCallback callback)
Sets the content of the file.
|
getAPIGroup, getAPIVersionboolean canRead(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.boolean canWrite(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.void create(FileDescriptor descriptor, IFileResultCallback callback)
descriptor - File descriptor of file or folder used for operation.callback - Result of the operation.boolean delete(FileDescriptor descriptor, boolean cascade)
descriptor - File descriptor of file or folder used for operation.cascade - Whether to delete sub-files and sub-folders.boolean exists(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.void getContent(FileDescriptor descriptor, IFileDataLoadResultCallback callback)
descriptor - File descriptor of file or folder used for operation.callback - Result of the operation.IFileSystemStorageType getFileStorageType(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.IFileSystemType getFileType(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.IFileSystemSecurity getSecurityType(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.boolean isDirectory(FileDescriptor descriptor)
descriptor - File descriptor of file or folder used for operation.void listFilesForRegex(FileDescriptor descriptor, java.lang.String regex, IFileListResultCallback callback)
descriptor - File descriptor of file or folder used for operation.regex - Filter (eg. *.jpg, *.png, Fil*) name string.callback - Result of operation.void listFiles(FileDescriptor descriptor, IFileListResultCallback callback)
descriptor - File descriptor of file or folder used for operation.callback - Result of operation.boolean mkDir(FileDescriptor descriptor, boolean recursive)
descriptor - File descriptor of file or folder used for operation.recursive - Whether to create all parent path elements.void move(FileDescriptor source, FileDescriptor destination, boolean createPath, boolean overwrite, IFileResultCallback callback)
source - File descriptor of file or folder used for operation as source.destination - File descriptor of file or folder used for operation as destination.createPath - True to create the path if it does not already exist.callback - Result of the operation.overwrite - True to create the path if it does not already exist.void setContent(FileDescriptor descriptor, byte[] content, IFileDataStoreResultCallback callback)
descriptor - File descriptor of file or folder used for operation.content - Binary content to store in the file.callback - Result of the operation.