|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
A IFileService is an abstraction of a file service that runs over some sort of connection. It can be shared among multiple instances of a subsystem. At some point this file service layer may become official API but for now it is experimental. Each subsystem is currently responsible for layering an abstraction over whatever it wants to construct as a service.
This is a very bare bones definition. A real definition would probably have changed terminology, use URI's rather than Strings, and have much more robust error handling.
Implementers of this interface will have to either be instantiated, initialized, or somehow derive a connection as part of its state.
| Method Summary | |
|---|---|
boolean |
copy(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
Copy the file or folder to the specified destination |
boolean |
copyBatch(IProgressMonitor monitor,
String[] srcParents,
String[] srcNames,
String tgtParent)
Copy a set of files or folders to the specified destination |
IHostFile |
createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
Create a file on the host |
IHostFile |
createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
Create a folder on the host |
boolean |
delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
Deletes a file or folder on the host |
boolean |
deleteBatch(IProgressMonitor monitor,
String[] remoteParents,
String[] fileNames)
Deletes a set of files or folders on the host. |
boolean |
download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String hostEncoding)
Copy a file from the remote file system to the local system. |
IHostFile |
getFile(IProgressMonitor monitor,
String remoteParent,
String name)
|
IHostFile[] |
getFiles(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
|
IHostFile[] |
getFilesAndFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
|
IHostFile[] |
getFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
|
IHostFile[] |
getRoots(IProgressMonitor monitor)
|
IHostFile |
getUserHome()
|
boolean |
isCaseSensitive()
Indicates whether the file system is case sensitive |
boolean |
move(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
Move the file or folder specified |
boolean |
rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName)
Renames a file or folder on the host |
boolean |
rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName,
IHostFile oldFile)
Renames a file or folder on the host |
boolean |
upload(IProgressMonitor monitor,
File localFile,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding)
Copy a file to the remote file system. |
boolean |
upload(IProgressMonitor monitor,
InputStream stream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding)
Copy a file to the remote file system. |
| Methods inherited from interface org.eclipse.rse.services.IService |
|---|
getDescription, getMessage, getName, initService, uninitService |
| Method Detail |
public boolean upload(IProgressMonitor monitor,
InputStream stream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding)
throws SystemMessageException
monitor - the monitor for this potentially long running operationstream - input stream to transferremoteParent - - a string designating the parent folder of the target for this file.remoteFile - - a string designating the name of the file to be written on the remote system.isBinary - - indicates whether the file is text or binaryhostEncoding - - the tgt encoding of the file (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean upload(IProgressMonitor monitor,
File localFile,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding)
throws SystemMessageException
monitor - the monitor for this potentially long running operationlocalFile - - a real file in the local file system.remoteParent - - a string designating the parent folder of the target for this file.remoteFile - - a string designating the name of the file to be written on the remote system.isBinary - - indicates whether the file is text or binarysrcEncoding - - the src encoding of the file (if text)hostEncoding - - the tgt encoding of the file (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String hostEncoding)
throws SystemMessageException
monitor - the monitor for this potentially long running operationremoteParent - - a String designating the remote parent.remoteFile - - a String designating the remote file residing in the parent.localFile - - The file that is to be written. If the file exists it is
overwritten.isBinary - - indicates whether the file is text on binaryhostEncoding - - the encoding on the host (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile getFile(IProgressMonitor monitor,
String remoteParent,
String name)
throws SystemMessageException
monitor - the monitor for this potentially long running operationremoteParent - name -
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile[] getFilesAndFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
throws SystemMessageException
monitor - the monitor for this potentially long running operationremoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list.fileFilter - - a string that can be used to filter the children. Only
those files matching the filter make it into the list. The interface
does not dictate where the filtering occurs.
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile[] getFiles(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
throws SystemMessageException
monitor - the monitor for this potentially long running operationremoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list.fileFilter - - a string that can be used to filter the children. Only
those files matching the filter make it into the list. The interface
does not dictate where the filtering occurs.
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile[] getFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
throws SystemMessageException
monitor - the monitor for this potentially long running operationremoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list.fileFilter - - a string that can be used to filter the children. Only
those files matching the filter make it into the list. The interface
does not dictate where the filtering occurs.
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile[] getRoots(IProgressMonitor monitor)
throws SystemMessageException
monitor - the monitor for this potentially long running operation
Return the list of roots for this system
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.public IHostFile getUserHome()
public IHostFile createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
monitor - the monitor for this potentially long running operationremoteParent - the parent directoryfileName - the name of the new file
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
throws SystemMessageException
monitor - the progress monitorremoteParent - the parent directoryfolderName - the name of the new folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
monitor - the progress monitorremoteParent - the folder containing the file to deletefileName - the name of the file or folder to delete
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean deleteBatch(IProgressMonitor monitor,
String[] remoteParents,
String[] fileNames)
throws SystemMessageException
monitor - the progress monitorremoteParents - the array of folders containing the files to deletefileNames - the names of the files or folders to delete
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName)
throws SystemMessageException
monitor - the progress monitorremoteParent - the folder containing the file to renameoldName - the old name of the file or folder to renamenewName - the new name for the file
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName,
IHostFile oldFile)
throws SystemMessageException
monitor - the progress monitorremoteParent - the folder containing the file to renameoldName - the old name of the file or folder to renamenewName - the new name for the fileoldFile - the file to update with the change
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean move(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
throws SystemMessageException
monitor - the progress monitorsrcParent - the folder containing the file or folder to movesrcName - the new of the file or folder to movetgtParent - the destination folder for the movetgtName - the name of the moved file or folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean copy(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
throws SystemMessageException
monitor - the progress monitorsrcParent - the folder containing the file or folder to copysrcName - the new of the file or folder to copytgtParent - the destination folder for the copytgtName - the name of the copied file or folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean copyBatch(IProgressMonitor monitor,
String[] srcParents,
String[] srcNames,
String tgtParent)
throws SystemMessageException
monitor - the progress monitorsrcParents - the folders containing each file or folder to copysrcNames - the names of the files or folders to copytgtParent - the destination folder for the copy
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.public boolean isCaseSensitive()
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||