|
RSE Release 3.2 |
|||||||||
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. |
void |
copy(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Copy a file or folder to a new target parent folder. |
void |
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. |
void |
delete(IRemoteFile folderOrFile,
IProgressMonitor monitor)
Delete the given remote file or folder. |
void |
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. |
void |
downloadMultiple(IRemoteFile[] sources,
String[] destinations,
String[] encodings,
IProgressMonitor monitor)
Get the remote files and save them 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)
Deprecated. Use getOutputStream(String, String, int, IProgressMonitor) instead |
OutputStream |
getOutputStream(String remoteParent,
String remoteFile,
int options,
IProgressMonitor monitor)
Gets the output stream to write/append 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. |
IRemoteFile[] |
getRemoteFileObjects(String[] 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[] |
list(IRemoteFile parent,
int fileType,
IProgressMonitor monitor)
Return a list of all remote folders and/or files in the given folder. |
IRemoteFile[] |
list(IRemoteFile parent,
IProgressMonitor monitor)
Return a list of all remote folders and/or files in the given folder. |
IRemoteFile[] |
list(IRemoteFile parent,
String fileNameFilter,
int fileType,
IProgressMonitor monitor)
Return a list of remote folders and/or files in the given folder. |
IRemoteFile[] |
list(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
int fileType,
IProgressMonitor monitor)
Return a list of remote folders and/or files in the given folder. |
IRemoteFile[] |
listMultiple(IRemoteFile[] parents,
int[] fileTypes,
IProgressMonitor monitor)
Return a list of all remote folders and/or files in the given folders. |
IRemoteFile[] |
listMultiple(IRemoteFile[] parents,
int fileType,
IProgressMonitor monitor)
Return a list of all remote folders and/or files in the given folders. |
IRemoteFile[] |
listMultiple(IRemoteFile[] parents,
String[] fileNameFilters,
int[] fileTypes,
IProgressMonitor monitor)
Return a list of remote folders and/or files in the given folder. |
IRemoteFile[] |
listMultiple(IRemoteFile[] parents,
String[] fileNameFilters,
int fileType,
IProgressMonitor monitor)
Return a list of remote folders and/or 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. |
void |
move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Move a file or folder to a new target parent folder. |
void |
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. |
void |
setLastModified(IRemoteFile folderOrFile,
long newDate,
IProgressMonitor monitor)
Set the last modified date for the given file or folder. |
void |
setReadOnly(IRemoteFile folderOrFile,
boolean readOnly,
IProgressMonitor monitor)
Set a files read-only permissions. |
boolean |
supportsEncodingConversion()
Indicates whether this file subsystem supports code page conversion using the IFileServiceCodePageConverter mechanism. |
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. |
void |
uploadMultiple(String[] sources,
IRemoteFile[] destinations,
String[] encodings,
IProgressMonitor monitor)
Put the local copies of the remote files to the remote locations. |
void |
uploadMultiple(String[] sources,
String[] srcEncodings,
String[] remotePaths,
String[] rmtEncodings,
IProgressMonitor monitor)
Put the local copies of the remote files to the remote locations. |
Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver |
---|
getObjectWithAbsoluteName, 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[] listMultiple(IRemoteFile[] parents, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException
parents
- The parent folders to list folders and/or files infileTypes
- - indicates whether to query files, folders, both or some other type. There
should be exactly one fileType specified per parent.
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException
parents
- The parent folders to list folders and files infileNameFilters
- The name patterns to subset the file list by, or null to return all files.
There should be exactly one fileNameFilter per parent.fileTypes
- - indicates whether to query files, folders, both or some other type. There
should be exactly one fileType specified per parent.
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
IRemoteFile[] listMultiple(IRemoteFile[] parents, int fileType, IProgressMonitor monitor) throws SystemMessageException
parents
- The parent folders to list folders and/or files infileType
- - indicates whether to query files, folders, both or some other type. This fileType is used for each parent query.
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int fileType, IProgressMonitor monitor) throws SystemMessageException
parents
- The parent folders to list folders and files infileNameFilters
- The name patterns to subset the file list by, or null to return all files.
There should be exactly one fileNameFilter per parent.fileType
- - indicates whether to query files, folders, both or some other type.
Available file types include IFileService.FILE_TYPE_FILES
,
IFileService.FILE_TYPE_FOLDERS
, and
IFileService.FILE_TYPE_FILES_AND_FOLDERS
.monitor
- the progress monitor
SystemMessageException
IRemoteFile[] list(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
parent
- The parent folder to list folders and/or files inmonitor
- the progress monitor
SystemMessageException
IRemoteFile[] list(IRemoteFile parent, int fileType, IProgressMonitor monitor) throws SystemMessageException
parent
- The parent folder to list folders and files infileType
- - indicates whether to query files, folders, both or some other type.
Available file types include IFileService.FILE_TYPE_FILES
,
IFileService.FILE_TYPE_FOLDERS
, and
IFileService.FILE_TYPE_FILES_AND_FOLDERS
.monitor
- the progress monitor
SystemMessageException
IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, int fileType, 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.fileType
- - indicates whether to query files, folders, both or some other type.
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, int fileType, 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.context
- The holder of state information
- indicates whether to query files, folders, both or some other typefileType
- - indicates whether to query files, folders, both or some other type
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
void 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.String getRemoteEncoding()
IRemoteFile[] getRemoteFileObjects(String[] 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
IFileService.createFolder(String, String, IProgressMonitor)
).
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)
void 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.void deleteBatch(IRemoteFile[] folderOrFiles, IProgressMonitor monitor) throws SystemMessageException
If an error occurs during the deletion of an item, this operation stops on that item and a SystemMessageException
is thrown.
Items deleted before that item will remain deleted. Items specified after that item will not be deleted.
The item on which the error occurs will not be deleted.
Without an exception thrown in such cases, views may not be refreshed correctly to account for deleted resources.
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.void 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.void 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.void 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.void 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.void 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.void copyBatch(IRemoteFile[] sourceFolderOrFile, IRemoteFile targetFolder, IProgressMonitor monitor) throws SystemMessageException
If an error occurs during the copy of an item, this operation stops on that item and a SystemMessageException
is thrown.
Items copied before that item will remain copied. Items copied after that item will not be copied.
The item on which the error occurs will not be copied.
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 downloadMultiple(IRemoteFile[] sources, String[] destinations, String[] encodings, IProgressMonitor monitor) throws SystemMessageException
sources
- remote files that represent the files to be obtaineddestinations
- the absolute paths of the local filesencodings
- the encodings of the local filesmonitor
- 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.void uploadMultiple(String[] sources, IRemoteFile[] destinations, String[] encodings, IProgressMonitor monitor) throws SystemMessageException
sources
- the absolute paths of the local copiesdestinations
- remote files that represent the files on the serverencodings
- the encodings of the local copiesmonitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.void uploadMultiple(String[] sources, String[] srcEncodings, String[] remotePaths, String[] rmtEncodings, IProgressMonitor monitor) throws SystemMessageException
sources
- the absolute paths of the local copiessrcEncodings
- the encodings of the local copiesremotePaths
- remote files that represents the files on the serverrmtEncodings
- the encodings of the remote files.
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
InterruptedException
InetAddress 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
getOutputStream(String, String, int, IProgressMonitor)
instead
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, int options, IProgressMonitor monitor) throws SystemMessageException
null
.
remoteParent
- the absolute path of the parent.remoteFile
- the name of the remote file.options
- bit wise or of option constants. Valid constants are IFileService.APPEND
, IFileService.TEXT_MODE
, and IFileService.NONE
monitor
- the progress monitor.
SystemMessageException
- if an error occurs.boolean supportsEncodingConversion()
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |