|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRemoteFileSubSystem
Specialized interface for remote file subsystems.
These are unix/windows like file systems, versus native OS/400 or OS/390 file subsystems. Rather, it is more like the IFS and HFS systems on these operating systems.
The idea is to encourage a common API and GUI layer that works with any remote unix-like file system on any remote operating system.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
NO_CHILDREN |
| Method Summary | |
|---|---|
void |
cancelSearch(IHostSearchResultConfiguration searchConfig)
Given a search configuration, cancel the search. |
boolean |
copy(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Copy a file or folder to a new target parent folder. |
boolean |
copyBatch(IRemoteFile[] sourceFolderOrFile,
IRemoteFile targetFolder,
IProgressMonitor monitor)
Copy a set of remote files or folders to a new target parent folder. |
IRemoteFile |
createFile(IRemoteFile fileToCreate,
IProgressMonitor monitor)
Create a new file, given its IRemoteFile object (these do not have to represent existing files). |
IRemoteFile |
createFolder(IRemoteFile folderToCreate,
IProgressMonitor monitor)
Create a new folder, given its IRemoteFile object (these do not have to represent existing folders) The parent folder must exist for this to succeed. |
IRemoteFile |
createFolders(IRemoteFile folderToCreate,
IProgressMonitor monitor)
Given an IRemoteFile for a folder, this will create that folder and any missing parent folders in its path. |
boolean |
delete(IRemoteFile folderOrFile,
IProgressMonitor monitor)
Delete the given remote file or folder. |
boolean |
deleteBatch(IRemoteFile[] folderOrFiles,
IProgressMonitor monitor)
Delete the given batch of remote file or folder. |
void |
download(IRemoteFile source,
String destination,
String encoding,
IProgressMonitor monitor)
Get the remote file and save it locally. |
InputStream |
getInputStream(String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
Gets the input stream to access the contents a remote file. |
ILanguageUtilityFactory |
getLanguageUtilityFactory()
Returns a language utility factory associated with this subsystem. |
String |
getLineSeparator()
Return as a string the line separator. |
InetAddress |
getLocalAddress()
Returns the TCP/IP address for the local system that is accessible from the remote server. |
OutputStream |
getOutputStream(String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
Gets the output stream to write to a remote file. |
IRemoteFile |
getParentFolder(IRemoteFile folderOrFile,
IProgressMonitor monitor)
Given a folder or file, return its parent folder object. |
String |
getParentFolderName(IRemoteFile folderOrFile)
Given a folder or file, return its parent folder name, fully qualified |
IRemoteFileSubSystemConfiguration |
getParentRemoteFileSubSystemConfiguration()
Return parent subsystem factory, cast to a RemoteFileSubSystemConfiguration |
String |
getPathSeparator()
Return in string format the character used to separate paths. |
char |
getPathSeparatorChar()
Return in char format the character used to separate paths. |
String |
getRemoteEncoding()
Returns the encoding of the remote system. |
IRemoteFile |
getRemoteFileObject(IRemoteFile parent,
String folderOrFileName,
IProgressMonitor monitor)
Given a un-qualified file or folder name, and its parent folder object, return an IRemoteFile object for the file. |
IRemoteFile |
getRemoteFileObject(String folderOrFileName,
IProgressMonitor monitor)
Given a fully qualified file or folder name, return an IRemoteFile object for it. |
SystemRemoteResourceSet |
getRemoteFileObjects(List folderOrFileNames,
IProgressMonitor monitor)
Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it. |
IRemoteSearchResult |
getRemoteSearchResultObject(String key)
Given a key, returns a search result object for it. |
String |
getSeparator()
Return in string format the character used to separate folders. |
char |
getSeparatorChar()
Return in character format the character used to separate folders. |
int |
getUnusedPort()
Returns an unused port number on the remote host that could be used by any tool on the host. |
boolean |
isCaseSensitive()
Return true if file names are case-sensitive. |
IRemoteFile[] |
listFiles(IRemoteFile parent,
IProgressMonitor monitor)
Return a list of all remote files in the given parent folder on the remote system |
IRemoteFile[] |
listFiles(IRemoteFile parent,
String fileNameFilter,
IProgressMonitor monitor)
Return a list of remote files in the given folder, which match the given name pattern. |
IRemoteFile[] |
listFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
Return a list of remote files in the given folder, which match the given name pattern. |
IRemoteFile[] |
listFolders(IRemoteFile parent,
IProgressMonitor monitor)
Return a list of all remote folders in the given parent folder on the remote system |
IRemoteFile[] |
listFolders(IRemoteFile parent,
String fileNameFilter,
IProgressMonitor monitor)
Return a full list of remote folders in the given parent folder on the remote system. |
IRemoteFile[] |
listFolders(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
Return a subsetted list of remote folders in the given parent folder on the remote system. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent,
IProgressMonitor monitor)
Return a list of all remote folders and files in the given folder. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IProgressMonitor monitor)
Return a list of remote folders and files in the given folder. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
Return a list of remote folders and files in the given folder. |
IRemoteFile[] |
listRoots(IProgressMonitor monitor)
Return a list of roots/drives on the remote system. |
IRemoteFile[] |
listRoots(IRemoteFileContext context,
IProgressMonitor monitor)
Return a list of roots/drives on the remote system. |
boolean |
move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Move a file or folder to a new target parent folder. |
boolean |
rename(IRemoteFile folderOrFile,
String newName,
IProgressMonitor monitor)
Rename the given remote file or folder. |
void |
search(IHostSearchResultConfiguration searchConfig)
Given a search configuration, searches for its results. |
boolean |
setLastModified(IRemoteFile folderOrFile,
long newDate,
IProgressMonitor monitor)
Set the last modified date for the given file or folder. |
boolean |
setReadOnly(IRemoteFile folderOrFile,
boolean readOnly,
IProgressMonitor monitor)
Set a files read-only permissions. |
boolean |
supportsEncoding()
Returns whether the file subsystem supports encodings. |
void |
upload(String source,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
upload(String source,
String srcEncoding,
String remotePath,
String rmtEncoding,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
| Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver |
|---|
getObjectWithAbsoluteName |
| Methods inherited from interface org.eclipse.core.runtime.jobs.ISchedulingRule |
|---|
contains, isConflicting |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEModelObject |
|---|
getDescription |
| Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
|---|
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Method Detail |
|---|
IRemoteFileSubSystemConfiguration getParentRemoteFileSubSystemConfiguration()
boolean isCaseSensitive()
String getSeparator()
getParentRemoteFileSubSystemConfiguration().getSeparator()
char getSeparatorChar()
getParentRemoteFileSubSystemConfiguration().getSeparatorChar()
String getPathSeparator()
getParentRemoteFileSubSystemConfiguration().getPathSeparator()
char getPathSeparatorChar()
getParentRemoteFileSubSystemConfiguration().getPathSeparatorChar()
String getLineSeparator()
getParentRemoteFileSubSystemConfiguration().getLineSeparator()
IRemoteFile[] listRoots(IProgressMonitor monitor)
throws InterruptedException,
SystemMessageException
InterruptedException
SystemMessageException
IRemoteFile[] listFolders(IRemoteFile parent,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list folders inmonitor - the progress monitor
SystemMessageException
IRemoteFile[] listFolders(IRemoteFile parent,
String fileNameFilter,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list folders infileNameFilter - The name pattern for subsetting the file list when this folder is subsequently expandedmonitor - the progress monitor
SystemMessageException
IRemoteFile[] listFiles(IRemoteFile parent,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list files inmonitor - the progress monitor
SystemMessageException
IRemoteFile[] listFiles(IRemoteFile parent,
String fileNameFilter,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list files infileNameFilter - The name pattern to subset the list by, or null to return all files.monitor - the progress monitor
SystemMessageException
IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list folders and files inmonitor - the progress monitor
SystemMessageException
IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list folders and files infileNameFilter - The name pattern to subset the file list by, or null to return all files.monitor - the progress monitor
SystemMessageException
IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
throws SystemMessageException
The files part of the list is subsetted by the given file name filter. It can be null for no subsetting. This version is called by RemoteFileSubSystemImpl's resolveFilterString(s).
parent - The parent folder to list folders and files infileNameFilter - The name pattern to subset the file list by, or null to return all files.context - The holder of state informationmonitor - the progress monitor
SystemMessageException
IRemoteFile[] listFolders(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list folders infileNameFilter - The name pattern for subsetting the file list when this folder is subsequently expandedcontext - The holder of state informationmonitor - the progress monitor
SystemMessageException
IRemoteFile[] listFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
throws SystemMessageException
parent - The parent folder to list files infileNameFilter - The name pattern to subset the list by, or null to return all files.context - The holder of state informationmonitor - the progress monitor
SystemMessageExceptionvoid search(IHostSearchResultConfiguration searchConfig)
searchConfig - a search configuration.void cancelSearch(IHostSearchResultConfiguration searchConfig)
searchConfig - a search configuration.
IRemoteFile getParentFolder(IRemoteFile folderOrFile,
IProgressMonitor monitor)
folderOrFile - folder or file to return parent of.monitor - the progress monitor
String getParentFolderName(IRemoteFile folderOrFile)
folderOrFile - folder or file to return parent of.boolean supportsEncoding()
false. Other file subsystems
may not deal with encodings at all.
true if the file subsystem supports encodings, false otherwise.- Since:
- 2.0
String getRemoteEncoding()
SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames,
IProgressMonitor monitor)
throws SystemMessageException
folderOrFileNames - Fully qualified folder or file namesmonitor - the progress monitor
SystemMessageException
IRemoteFile getRemoteFileObject(String folderOrFileName,
IProgressMonitor monitor)
throws SystemMessageException
This may be a long-running operation involving remote system access if the file with the given key is not found in the internal cache.
folderOrFileName - Fully qualified folder or file name.monitor - the progress monitor
SystemMessageException - in case an error occurs contacting the
remote system while retrieving the requested remote object.
IRemoteFile getRemoteFileObject(IRemoteFile parent,
String folderOrFileName,
IProgressMonitor monitor)
throws SystemMessageException
parent - Folder containing the folder or filefolderOrFileName - Un-qualified folder or file namemonitor - the progress monitor
SystemMessageException
IRemoteSearchResult getRemoteSearchResultObject(String key)
throws SystemMessageException
key - the key that uniquely identifies a search result.
SystemMessageException
IRemoteFile createFile(IRemoteFile fileToCreate,
IProgressMonitor monitor)
throws SystemMessageException
fileToCreate - The object representing the file to be created.
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.createFolders(IRemoteFile,IProgressMonitor)
IRemoteFile createFolder(IRemoteFile folderToCreate,
IProgressMonitor monitor)
throws SystemMessageException
folderToCreate - The object representing the folder to be created.monitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.createFolders(IRemoteFile, IProgressMonitor)
IRemoteFile createFolders(IRemoteFile folderToCreate,
IProgressMonitor monitor)
throws SystemMessageException
folderToCreate - The object representing the folder to be created, along with its parents.monitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.getParentFolder(IRemoteFile, IProgressMonitor)
boolean delete(IRemoteFile folderOrFile,
IProgressMonitor monitor)
throws SystemMessageException
folderOrFile - represents the object to be deleted.monitor - progressMonitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean deleteBatch(IRemoteFile[] folderOrFiles,
IProgressMonitor monitor)
throws SystemMessageException
folderOrFiles - represents the objects to be deleted.monitor - progressMonitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean rename(IRemoteFile folderOrFile,
String newName,
IProgressMonitor monitor)
throws SystemMessageException
folderOrFile - represents the object to be renamed.newName - new name to give it.monitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
throws SystemMessageException
sourceFolderOrFile - The file or folder to movetargetFolder - The folder to move to. No guarantee it is on the same system, so be sure to check getSystemConnection()!newName - The new name for the moved file or foldermonitor - progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean setLastModified(IRemoteFile folderOrFile,
long newDate,
IProgressMonitor monitor)
throws SystemMessageException
folderOrFile - represents the object to be renamed.newDate - new date, in milliseconds from epoch, to assign.monitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean setReadOnly(IRemoteFile folderOrFile,
boolean readOnly,
IProgressMonitor monitor)
throws SystemMessageException
folderOrFile - represents the object to be renamed.readOnly - whether to set it to be read-only or notmonitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean copy(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
throws SystemMessageException
sourceFolderOrFile - The file or folder to copytargetFolder - The folder to copy to. No guarantee it is on the same system, so be sure to check getSystemConnection()!newName - The new name for the copied file or foldermonitor - progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
boolean copyBatch(IRemoteFile[] sourceFolderOrFile,
IRemoteFile targetFolder,
IProgressMonitor monitor)
throws SystemMessageException
sourceFolderOrFile - The file or folder to copytargetFolder - The folder to copy to.monitor - progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
void download(IRemoteFile source,
String destination,
String encoding,
IProgressMonitor monitor)
throws SystemMessageException
source - remote file that represents the file to be obtaineddestination - the absolute path of the local fileencoding - the encoding of the local filemonitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
void upload(String source,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
throws SystemMessageException
source - the absolute path of the local copydestination - remote file that represents the file on the serverencoding - the encoding of the local copymonitor - the progress monitor
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.
void upload(String source,
String srcEncoding,
String remotePath,
String rmtEncoding,
IProgressMonitor monitor)
throws SystemMessageException
source - the absolute path of the local copysrcEncoding - the encoding of the local copyremotePath - remote file that represents the file on the serverrmtEncoding - the encoding of the remote file.
SystemMessageException - if an error occurs.
Typically this would be one of those in the
RemoteFileException family.ILanguageUtilityFactory getLanguageUtilityFactory()
int getUnusedPort()
IRemoteFile[] listRoots(IRemoteFileContext context,
IProgressMonitor monitor)
throws InterruptedException
InterruptedExceptionInetAddress getLocalAddress()
null.
null if
no address can be resolved.
InputStream getInputStream(String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
throws SystemMessageException
null.
remoteParent - the absolute path of the parent.remoteFile - the name of the remote file.isBinary - true if the file is a binary file, false otherwise.monitor - the progress monitor.
SystemMessageException - if an error occurs.
OutputStream getOutputStream(String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
throws SystemMessageException
null.
remoteParent - the absolute path of the parent.remoteFile - the name of the remote file.isBinary - true if the file is a binary file, false otherwise.monitor - the progress monitor.
SystemMessageException - if an error occurs.
|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||