public class FilesController
extends java.lang.Object
| Constructor and Description |
|---|
FilesController(NodeRPCConnection connection)
Create by the RPC connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyFile(java.lang.String srcPath,
java.lang.String destPath)
Copy file from srcPath to destPath.
|
void |
delete(java.lang.String path)
Delete the remote file.
|
java.io.Reader |
getDownloadReader(java.lang.String path)
Get the download reader for downloading the content of the file.
|
java.io.InputStream |
getDownloadStream(java.lang.String path)
Get the input stream for downloading the content of the file.
|
java.lang.String |
getHash(java.lang.String path)
Get the hash code of the remote file content.
|
FileInfo |
getProperty(java.lang.String path)
Get the details of the remote file.
|
java.io.OutputStream |
getUploadStream(java.lang.String path)
Get the upload stream for uploading the content of the file.
|
java.io.Writer |
getUploadWriter(java.lang.String path)
Get the upload writer for uploading the content of the file.
|
java.util.List<FileInfo> |
listChildren(java.lang.String path)
List the files on the remote folder.
|
void |
moveFile(java.lang.String srcPath,
java.lang.String destPath)
Move file from srcPath to destPath.
|
public FilesController(NodeRPCConnection connection)
connection - The RPC connection.public java.io.OutputStream getUploadStream(java.lang.String path)
throws HiveException
path - The uploading file path.HiveException - The error comes from the hive node.public java.io.Writer getUploadWriter(java.lang.String path)
throws HiveException
path - The uploading file path.HiveException - The error comes from the hive node.public java.io.InputStream getDownloadStream(java.lang.String path)
throws HiveException
path - The download file path.HiveException - The error comes from the hive node.public java.io.Reader getDownloadReader(java.lang.String path)
throws HiveException
path - The download file path.HiveException - The error comes from the hive node.public java.util.List<FileInfo> listChildren(java.lang.String path) throws HiveException
path - The path of the folder.HiveException - The error comes from the hive node.public FileInfo getProperty(java.lang.String path) throws HiveException
path - The path of the remote file.HiveException - The error comes from the hive node.public java.lang.String getHash(java.lang.String path)
throws HiveException
path - The path of the remote file.HiveException - The error comes from the hive node.public void copyFile(java.lang.String srcPath,
java.lang.String destPath)
throws HiveException
srcPath - The source path.destPath - The destination path.HiveException - The error comes from the hive node.public void moveFile(java.lang.String srcPath,
java.lang.String destPath)
throws HiveException
srcPath - The source path.destPath - The destination path.HiveException - The error comes from the hive node.public void delete(java.lang.String path)
throws HiveException
path - The path of the file.HiveException - The error comes from the hive node.