public final class FileServiceImpl extends Object implements FileService, SimpleRMI.ServerListener
| Constructor and Description |
|---|
FileServiceImpl(Path basePath) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
concat(List<String> relativePaths,
boolean ignoreNonExistant) |
void |
delete(String relativePath)
Deletes the file or directory ( recursively )
|
void |
destroy()
Called upon server shutdown.
|
boolean |
exists(String relativePath)
Returns true if the file exists.
|
FileData |
getFileData(String relativePath) |
long |
getLength(String relativePath) |
PathInfo |
getRoot()
Returns the root directory supported by this file service
|
void |
init(GenericTCPServer.ServerContext context)
Called upon server start to inform the handler of context information
such as the listening address.
|
boolean |
isDirectory(String relativePath)
Returns true if the file exists and is a directory.
|
boolean |
isFile(String relativePath)
Returns true if the file exists and is a file ( not a directory ).
|
List<FileData> |
listPathData(String relativePath)
Lists the files and subdirectories under this directory
|
List<String> |
listPaths(String relativePath)
Lists the files and subdirectories under this directory
|
InputStream |
openInputStream(String relativePath)
Opens the file for reading.
|
OutputStream |
openOutputStream(String relativePath,
WriteMode mode)
Opens the file for writing.
|
public FileServiceImpl(Path basePath)
public boolean isFile(String relativePath)
FileServiceisFile in interface FileServicerelativePath - the file pathpublic boolean exists(String relativePath)
FileServiceexists in interface FileServicerelativePath - the file pathpublic boolean isDirectory(String relativePath)
FileServiceisDirectory in interface FileServicerelativePath - the file pathpublic FileData getFileData(String relativePath)
getFileData in interface FileServicepublic InputStream openInputStream(String relativePath)
FileServiceopenInputStream in interface FileServicerelativePath - the file pathpublic OutputStream openOutputStream(String relativePath, WriteMode mode)
FileServiceopenOutputStream in interface FileServicerelativePath - the file pathmode - the write modepublic List<String> listPaths(String relativePath)
FileServicelistPaths in interface FileServicerelativePath - the file pathpublic List<FileData> listPathData(String relativePath)
FileServicelistPathData in interface FileServicerelativePath - the file pathpublic void delete(String relativePath)
FileServicedelete in interface FileServicerelativePath - the file pathpublic void init(GenericTCPServer.ServerContext context)
SimpleRMI.ServerListenerinit in interface SimpleRMI.ServerListenercontext - the server contextpublic void destroy()
SimpleRMI.ServerListenerdestroy in interface SimpleRMI.ServerListenerpublic PathInfo getRoot()
FileServicegetRoot in interface FileServicepublic long getLength(String relativePath)
getLength in interface FileServicepublic InputStream concat(List<String> relativePaths, boolean ignoreNonExistant)
concat in interface FileServiceCopyright © 2015 Actian Corporation. All Rights Reserved.