public interface SOSecureFS
Modifier and Type | Interface and Description |
---|---|
static class |
SOSecureFS.FileAttributes
This class defines the attributes associated with the decrypted file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
closeFile(java.lang.Object handle)
This method closes an open file within the secure container.
|
boolean |
copyFile(java.lang.String src,
java.lang.String dst)
This method copies a file to a new location within the secure
container..
Both source and destination file paths will reside within the secure container and be constructed using the secure container identifier used in isSecurePath(String) . |
boolean |
createDirectory(java.lang.String path)
This method creates a directory, and all non-existent directories in
the supplied path, within the secure container.
The path will be constructed using the secure container identifier used in isSecurePath(String) . |
boolean |
createFile(java.lang.String path)
This method creates a file within the secure container.
The file path will be constructed using the secure container identifier used in isSecurePath(String) . |
boolean |
deleteFile(java.lang.String path)
This method deletes a file from within the secure container..
The file path will be constructed using the secure container identifier used in isSecurePath(String) . |
boolean |
fileExists(java.lang.String path)
This method tests for the existence of a file within the secure
container.
The file path will be constructed using the secure container identifier used in isSecurePath(String) . |
SOSecureFS.FileAttributes |
getFileAttributes(java.lang.String path)
This method returns the relevant attributes of the file located
at the supplied path.
|
java.lang.Object |
getFileHandleForReading(java.lang.String path)
This method opens an existing file, in the secure container, for
reading.
The file path will be constructed using the secure container identifier used in isSecurePath(String) . |
java.lang.Object |
getFileHandleForUpdating(java.lang.String path)
This method opens an existing file, in the secure container, for
updating.
The file path will be constructed using the secure container identifier used in isSecurePath(String) . |
java.lang.Object |
getFileHandleForWriting(java.lang.String path)
This method opens an existing file, in the secure container, for
writing.
The file path will be constructed using the secure container identifier used in isSecurePath(String) . |
long |
getFileLength(java.lang.Object handle)
This method obtains the length of a file within the secure container.
|
long |
getFileOffset(java.lang.Object handle)
This method obtains the offset, from the start of the file , of the
file pointer.
|
java.lang.String |
getSecurePath()
Return the physical root of the secure container.
|
java.lang.String |
getSecurePrefix()
Return the 'tag' to indicate the file is suitable for decryption.
|
java.lang.String |
getTempPath()
This method returns the directory to be used to store temporary
files created during file translation/saving.
This directory must reside within the secure container as identified in isSecurePath(String) . |
boolean |
isSecurePath(java.lang.String path)
This method determines whether the supplied file path resides
within the secure container.
The path may be a pseudo path on which a mapping can be performed to access the actual file. |
int |
readFromFile(java.lang.Object handle,
byte[] buf)
This method reads data from a file located within the secure container.
|
boolean |
recursivelyRemoveDirectory(java.lang.String path)
This method recursively deletes the supplied directory, and it's
sub-directories, located within the secure container.
The path will be constructed using the secure container identifier used in isSecurePath(String) . |
boolean |
renameFile(java.lang.String src,
java.lang.String dst)
This method renames a file within the secure container.
Both source and destination file paths will reside within the secure container and be constructed using the secure container identifier used in isSecurePath(String) . |
boolean |
seekToFileOffset(java.lang.Object handle,
long ofset)
This method moves the file pointer to the requested offset from 0.
|
boolean |
setFileLength(java.lang.Object handle,
long length)
This method sets the file length of a file located within the
secure container.
|
boolean |
syncFile(java.lang.Object handle)
This method forces buffered data to be written to the underlying
device.
|
int |
writeToFile(java.lang.Object handle,
byte[] buf)
This method writes data to a file located within the secure container.
|
boolean isSecurePath(java.lang.String path)
path
- The file path to be analysed.java.lang.String getTempPath()
isSecurePath(String)
.SOSecureFS.FileAttributes getFileAttributes(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to obtain attributes for.SOSecureFS.FileAttributes
object.boolean renameFile(java.lang.String src, java.lang.String dst)
isSecurePath(String)
.src
- The path to the file to be renamed.dst
- The path to the destination file.boolean copyFile(java.lang.String src, java.lang.String dst)
isSecurePath(String)
.src
- The path to the file to be copied.dst
- The path to the destination file.boolean deleteFile(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to be deleted.boolean fileExists(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to be checked.boolean recursivelyRemoveDirectory(java.lang.String path)
isSecurePath(String)
.path
- The path to the directory to be deleted.boolean createDirectory(java.lang.String path)
isSecurePath(String)
.path
- The path to the directory to be created.boolean createFile(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to be created.java.lang.Object getFileHandleForReading(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to be opened.java.lang.Object getFileHandleForWriting(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to be opened.java.lang.Object getFileHandleForUpdating(java.lang.String path)
isSecurePath(String)
.path
- The path to the file to be opened.boolean closeFile(java.lang.Object handle)
handle
- The file handle object to be closed.boolean setFileLength(java.lang.Object handle, long length)
handle
- The file handle object to be used..int readFromFile(java.lang.Object handle, byte[] buf)
handle
- The file handle object to be used..buf
- The buffer to put the read data in.int writeToFile(java.lang.Object handle, byte[] buf)
handle
- The file handle object to be used.buf
- The buffer containing the data.boolean syncFile(java.lang.Object handle)
handle
- The file handle object to be used.long getFileLength(java.lang.Object handle)
handle
- The file handle object to be used.long getFileOffset(java.lang.Object handle)
handle
- The file handle object to be used.boolean seekToFileOffset(java.lang.Object handle, long ofset)
handle
- The file handle object to be used.java.lang.String getSecurePath()
java.lang.String getSecurePrefix()