public interface ServerFileSystem
Modifier and Type | Method and Description |
---|---|
ServerFile |
createTemporaryFile(java.lang.String name)
Creates a new file with a unique name in the server's temporary file space.
|
void |
deleteFile(ServerFile file)
Deletes the specified file from this file system.
|
boolean |
directoryOrFileExists(ServerFile path,
boolean isDirectory)
Returns whether a directory or file exists.
|
boolean |
exists(ServerFile file)
Returns whether a file exists.
|
java.lang.String |
getAbsolutePath(ServerFile file)
Returns the absolute pathname or
null if
the absolute path cannot be determined. |
ServerFile |
getAbsoluteServerFile(ServerFile file)
Returns a file representing the absolute pathname or
null if
the absolute path cannot be determined. |
ServerFile |
getChild(ServerFile parent,
java.lang.String filename)
Returns the named child in the supplied parent.
|
ServerFile |
getDefaultDirectory()
Returns the server's default directory.
|
ServerFile[] |
getFiles(ServerFile directory)
Returns the list of files in the specified directory of the file system.
|
ServerFile |
getParentDirectory(ServerFile file)
Returns the parent directory of a file in the file system
|
java.lang.String |
getPathSeparator()
Returns a string version of the path separator character.
|
char |
getPathSeparatorChar()
Returns the path separator character for this file system.
|
ServerFile[] |
getRoots()
Returns the roots of the file system.
|
java.lang.String |
getSeparator()
Returns a string version of the separator character.
|
char |
getSeparatorChar()
Returns the separator character for this file system.
|
ServerFile |
getServerFile(java.lang.String filename)
Returns a server file for the corresponding file name.
|
long |
getSize(ServerFile file)
Returns the size, in bytes, of the specified file in this file system.
|
char getPathSeparatorChar()
getPathSeparator()
java.lang.String getPathSeparator()
getPathSeparatorChar()
char getSeparatorChar()
getSeparator()
java.lang.String getSeparator()
getSeparatorChar()
ServerFile getServerFile(java.lang.String filename)
filename
- a name of a file or folderServerFile[] getFiles(ServerFile directory) throws ServerResourceException
directory
- the directoryServerResourceException
- if the server file system cannot be accessedServerFile getDefaultDirectory() throws ServerResourceException
ServerFile
object representing the server's default directoryServerResourceException
- if the server file system cannot be accessedServerFile getAbsoluteServerFile(ServerFile file) throws ServerResourceException
null
if
the absolute path cannot be determined.file
- a ServerFile
objectServerResourceException
- if the server file system cannot be accessedjava.lang.String getAbsolutePath(ServerFile file) throws ServerResourceException
null
if
the absolute path cannot be determined.file
- a ServerFile
objectServerResourceException
- if the server file system cannot be accessedServerFile getParentDirectory(ServerFile file)
file
- a ServerFile
objectServerFile
object representing the parent directoryServerFile getChild(ServerFile parent, java.lang.String filename) throws ServerResourceException
parent
- a ServerFile
object repesenting a directory or special folderfilename
- a name of a file or folder which exists in parent
ServerResourceException
- if the server file system cannot be accessedServerFile[] getRoots() throws ServerResourceException
ServerResourceException
- if the server file system cannot be accessedboolean exists(ServerFile file) throws ServerResourceException
ServerResourceException
- if the server file system cannot be accessedboolean directoryOrFileExists(ServerFile path, boolean isDirectory) throws ServerResourceException
path
- Pathname to checkisDirectory
- Set to true
if the path to be tested should be a directoryServerResourceException
- if the server file system cannot be accessedlong getSize(ServerFile file) throws ServerResourceException
file
- the fileServerResourceException
- if the file system cannot be accessedServerFile createTemporaryFile(java.lang.String name) throws ServerResourceException
name
- the suggested name of the new fileServerResourceException
- if the file cannot be created for any reasonvoid deleteFile(ServerFile file) throws ServerResourceException
Calling this method has the same effect as creating and running a delete file task.
file
- the file to deleteServerResourceException
- if the file cannot be deletedTaskFactory.createDeleteFileTask(String)
Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.