RSE
Release 1.0

org.eclipse.rse.subsystems.files.core.subsystems
Interface IRemoteFileSubSystem

All Superinterfaces:
IPropertySetContainer, IRemoteObjectResolver, IRSEModelObject, org.eclipse.rse.core.persistance.IRSEPersistableContainer, ISchedulingRule, ISubSystem, ISystemFilterPoolReferenceManagerProvider
All Known Subinterfaces:
IFileServiceSubSystem
All Known Implementing Classes:
FileServiceSubSystem, RemoteFileSubSystem

public interface IRemoteFileSubSystem
extends ISubSystem


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)
          Create a new file, given its IRemoteFile object (these do not have to represent existing files).
 IRemoteFile createFolder(IRemoteFile folderToCreate)
          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)
          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, File destination, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void download(IRemoteFile source, File destination, String encoding, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void download(IRemoteFile source, IFile destination, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void download(IRemoteFile source, IFile destination, String encoding, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void download(IRemoteFile source, String destination, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void download(IRemoteFile source, String destination, String encoding, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void downloadUTF8(IRemoteFile source, File destination, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void downloadUTF8(IRemoteFile source, IFile destination, IProgressMonitor monitor)
          Get the remote file and save it locally.
 void downloadUTF8(IRemoteFile source, String destination, IProgressMonitor monitor)
          Get the remote file and save it locally.
 String getHomeFolder()
           
 org.eclipse.rse.internal.subsystems.files.core.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.
 IRemoteFile getParentFolder(IRemoteFile folderOrFile)
          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()
          Get the default encoding of the target system
 IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName)
          Given a un-qualified file or folder name, and its parent folder object, return an IRemoteFile object for the file.
 IRemoteFile getRemoteFileObject(String folderOrFileName)
          Given a fully qualified file or folder name, return an IRemoteFile object for it.
 SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames)
          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)
          Rename the given remote file or folder.
 void search(IHostSearchResultConfiguration searchConfig)
          Given a search configuration, searches for its results.
 void setHomeFolder(String value)
           
 boolean setLastModified(IRemoteFile folderOrFile, long newDate)
          Set the last modified date for the given file or folder.
 boolean setReadOnly(IRemoteFile folderOrFile)
          Set a file to readonly.
 void upload(File source, IRemoteFile destination, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 void upload(File source, IRemoteFile destination, String encoding, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 void upload(IFile source, IRemoteFile destination, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 void upload(IFile source, IRemoteFile destination, String encoding, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 void upload(InputStream stream, long totalBytes, IRemoteFile destination, String encoding, IProgressMonitor monitor)
          Put local data to a remote location.
 void upload(String source, IRemoteFile destination, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 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 destination, 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 uploadUTF8(File source, IRemoteFile destination, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 void uploadUTF8(IFile source, IRemoteFile destination, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 void uploadUTF8(String source, IRemoteFile destination, IProgressMonitor monitor)
          Put the local copy of the remote file back to the remote location.
 
Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystem
checkIsConnected, clearLocalUserId, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getCacheManager, getChildren, getConfigurationId, getConnectorService, getFilterPoolReferenceManager, getHost, getHostAliasName, getLocalUserId, getName, getPrimarySubSystem, getProperties, getProperty, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUserId, getVendorAttribute, hasChildren, initializeSubSystem, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterStrings, resolveFilterStrings, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setSubSystemConfiguration, setVendorAttribute, supportsCaching, uninitializeSubSystem
 
Methods inherited from interface org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider
filterEventFilterCreated, filterEventFilterPoolReferenceCreated, filterEventFilterPoolReferenceDeleted, filterEventFilterPoolReferenceRenamed, filterEventFilterPoolReferenceReset, filterEventFilterPoolReferencesRePositioned, filterEventFilterPoolReferencesReset, filterEventFilterStringCreated, getUniqueOwningSystemFilterPool
 
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.persistance.IRSEPersistableContainer
commit, isDirty, setDirty, setWasRestored, wasRestored
 

Method Detail

getParentRemoteFileSubSystemConfiguration

public IRemoteFileSubSystemConfiguration getParentRemoteFileSubSystemConfiguration()
Return parent subsystem factory, cast to a RemoteFileSubSystemConfiguration


isCaseSensitive

public boolean isCaseSensitive()
Return true if file names are case-sensitive. Used when doing name or type filtering


getSeparator

public String getSeparator()
Return in string format the character used to separate folders. Eg, "\" or "/".
Shortcut to getParentRemoteFileSubSystemConfiguration().getSeparator()


getSeparatorChar

public char getSeparatorChar()
Return in character format the character used to separate folders. Eg, "\" or "/"
Shortcut to getParentRemoteFileSubSystemConfiguration().getSeparatorChar()


getPathSeparator

public String getPathSeparator()
Return in string format the character used to separate paths. Eg, ";" or ":"
Shortcut to getParentRemoteFileSubSystemConfiguration().getPathSeparator()


getPathSeparatorChar

public char getPathSeparatorChar()
Return in char format the character used to separate paths. Eg, ";" or ":"
Shortcut to getParentRemoteFileSubSystemConfiguration().getPathSeparatorChar()


getLineSeparator

public String getLineSeparator()
Return as a string the line separator.
Shortcut to getParentRemoteFileSubSystemConfiguration().getLineSeparator()


listRoots

public IRemoteFile[] listRoots(IProgressMonitor monitor)
                        throws InterruptedException,
                               SystemMessageException
Return a list of roots/drives on the remote system. This version is called directly by users.

Throws:
InterruptedException
SystemMessageException

listFolders

public IRemoteFile[] listFolders(IRemoteFile parent,
                                 IProgressMonitor monitor)
                          throws SystemMessageException
Return a list of all remote folders in the given parent folder on the remote system

Parameters:
parent - The parent folder to list folders in
monitor - the progress monitor
Throws:
SystemMessageException

listFolders

public IRemoteFile[] listFolders(IRemoteFile parent,
                                 String fileNameFilter,
                                 IProgressMonitor monitor)
                          throws SystemMessageException
Return a full list of remote folders in the given parent folder on the remote system.

Parameters:
parent - The parent folder to list folders in
fileNameFilter - The name pattern for subsetting the file list when this folder is subsequently expanded
monitor - the progress monitor
Throws:
SystemMessageException

listFiles

public IRemoteFile[] listFiles(IRemoteFile parent,
                               IProgressMonitor monitor)
                        throws SystemMessageException
Return a list of all remote files in the given parent folder on the remote system

Parameters:
parent - The parent folder to list files in
monitor - the progress monitor
Throws:
SystemMessageException

listFiles

public IRemoteFile[] listFiles(IRemoteFile parent,
                               String fileNameFilter,
                               IProgressMonitor monitor)
                        throws SystemMessageException
Return a list of remote files in the given folder, which match the given name pattern.

Parameters:
parent - The parent folder to list files in
fileNameFilter - The name pattern to subset the list by, or null to return all files.
monitor - the progress monitor
Throws:
SystemMessageException

listFoldersAndFiles

public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
                                         IProgressMonitor monitor)
                                  throws SystemMessageException
Return a list of all remote folders and files in the given folder. The list is not subsetted.

Parameters:
parent - The parent folder to list folders and files in
monitor - the progress monitor
Throws:
SystemMessageException

listFoldersAndFiles

public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
                                         String fileNameFilter,
                                         IProgressMonitor monitor)
                                  throws SystemMessageException
Return a list of remote folders and files in the given folder. Only file names are subsettable by the given file name filter. It can be null for no subsetting.

Parameters:
parent - The parent folder to list folders and files in
fileNameFilter - The name pattern to subset the file list by, or null to return all files.
monitor - the progress monitor
Throws:
SystemMessageException

listFoldersAndFiles

public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
                                         String fileNameFilter,
                                         IRemoteFileContext context,
                                         IProgressMonitor monitor)
                                  throws SystemMessageException
Return a list of remote folders and files in the given folder.

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).

Parameters:
parent - The parent folder to list folders and files in
fileNameFilter - The name pattern to subset the file list by, or null to return all files.
context - The holder of state information
monitor - the progress monitor
Throws:
SystemMessageException

listFolders

public IRemoteFile[] listFolders(IRemoteFile parent,
                                 String fileNameFilter,
                                 IRemoteFileContext context,
                                 IProgressMonitor monitor)
                          throws SystemMessageException
Return a subsetted list of remote folders in the given parent folder on the remote system. This version is called by RemoteFileSubSystemImpl's resolveFilterString(s) noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point

Parameters:
parent - The parent folder to list folders in
fileNameFilter - The name pattern for subsetting the file list when this folder is subsequently expanded
context - The holder of state information
monitor - the progress monitor
Throws:
SystemMessageException

listFiles

public IRemoteFile[] listFiles(IRemoteFile parent,
                               String fileNameFilter,
                               IRemoteFileContext context,
                               IProgressMonitor monitor)
                        throws SystemMessageException
Return a list of remote files in the given folder, which match the given name pattern. This version is called by RemoteFileSubSystemImpl's resolveFilterString(s) noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point

Parameters:
parent - The parent folder to list files in
fileNameFilter - The name pattern to subset the list by, or null to return all files.
context - The holder of state information
monitor - the progress monitor
Throws:
SystemMessageException

search

public void search(IHostSearchResultConfiguration searchConfig)
Given a search configuration, searches for its results.

Parameters:
searchConfig - a search configuration.

cancelSearch

public void cancelSearch(IHostSearchResultConfiguration searchConfig)
Given a search configuration, cancel the search.

Parameters:
searchConfig - a search configuration.

getParentFolder

public IRemoteFile getParentFolder(IRemoteFile folderOrFile)
Given a folder or file, return its parent folder object.

Parameters:
folderOrFile - folder or file to return parent of.

getParentFolderName

public String getParentFolderName(IRemoteFile folderOrFile)
Given a folder or file, return its parent folder name, fully qualified

Parameters:
folderOrFile - folder or file to return parent of.

getRemoteEncoding

public String getRemoteEncoding()
Get the default encoding of the target system

Returns:
the encoding

getRemoteFileObjects

public SystemRemoteResourceSet getRemoteFileObjects(List folderOrFileNames)
                                             throws SystemMessageException
Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it.

Parameters:
folderOrFileNames - Fully qualified folder or file names
Throws:
SystemMessageException

getRemoteFileObject

public IRemoteFile getRemoteFileObject(String folderOrFileName)
                                throws SystemMessageException
Given a fully qualified file or folder name, return an IRemoteFile object for it.

Parameters:
folderOrFileName - Fully qualified folder or file name
Throws:
SystemMessageException

getRemoteFileObject

public IRemoteFile getRemoteFileObject(IRemoteFile parent,
                                       String folderOrFileName)
                                throws SystemMessageException
Given a un-qualified file or folder name, and its parent folder object, return an IRemoteFile object for the file.

Parameters:
parent - Folder containing the folder or file
folderOrFileName - Un-qualified folder or file name
Throws:
SystemMessageException

getRemoteSearchResultObject

public IRemoteSearchResult getRemoteSearchResultObject(String key)
                                                throws SystemMessageException
Given a key, returns a search result object for it. For the key, see <

Parameters:
key - the key that uniquely identifies a search result.
Throws:
SystemMessageException

createFile

public IRemoteFile createFile(IRemoteFile fileToCreate)
                       throws RemoteFileSecurityException,
                              RemoteFileIOException
Create a new file, given its IRemoteFile object (these do not have to represent existing files).

Parameters:
fileToCreate - The object representing the file to be created.
Returns:
The same input object returned for convenience. Will throw exception if it fails.
Throws:
RemoteFileSecurityException
RemoteFileIOException
See Also:
createFolders(IRemoteFile)

createFolder

public IRemoteFile createFolder(IRemoteFile folderToCreate)
                         throws RemoteFileSecurityException,
                                RemoteFileIOException
Create a new folder, given its IRemoteFile object (these do not have to represent existing folders)

Parameters:
folderToCreate - The object representing the folder to be created.
Returns:
The same input object returned for convenience. Will throw exception if it fails.
Throws:
RemoteFileSecurityException
RemoteFileIOException
See Also:
createFolders(IRemoteFile)

createFolders

public IRemoteFile createFolders(IRemoteFile folderToCreate)
                          throws RemoteFileSecurityException,
                                 RemoteFileIOException
Given an IRemoteFile for a folder, this will create that folder and any missing parent folders in its path. Use getParentFolder to get the parent object of your file or folder in order to call this method.

Parameters:
folderToCreate - The object representing the folder to be created, along with its parents.
Returns:
The same input object returned for convenience. Will throw exception if it fails.
Throws:
RemoteFileSecurityException
RemoteFileIOException
See Also:
getParentFolder(IRemoteFile)

delete

public boolean delete(IRemoteFile folderOrFile,
                      IProgressMonitor monitor)
               throws RemoteFolderNotEmptyException,
                      RemoteFileSecurityException,
                      RemoteFileIOException
Delete the given remote file or folder.

Parameters:
folderOrFile - represents the object to be deleted.
monitor - progressMonitor
Returns:
false if the given folder/file didn't exist to begin with, else true. Throws an exception if anything fails.
Throws:
RemoteFolderNotEmptyException
RemoteFileSecurityException
RemoteFileIOException

deleteBatch

public boolean deleteBatch(IRemoteFile[] folderOrFiles,
                           IProgressMonitor monitor)
                    throws RemoteFolderNotEmptyException,
                           RemoteFileSecurityException,
                           RemoteFileIOException
Delete the given batch of remote file or folder. Should throw an exception if some files and folders were deleted and others were not due to an exception during the operation. Without an exception thrown in such cases, views may not be refreshed correctly to account for deleted resources.

Parameters:
folderOrFiles - represents the objects to be deleted.
monitor - progressMonitor
Returns:
false if any of the given folder/file dont exist to begin with, else true. Throws an exception if anything fails.
Throws:
RemoteFolderNotEmptyException
RemoteFileSecurityException
RemoteFileIOException

rename

public boolean rename(IRemoteFile folderOrFile,
                      String newName)
               throws RemoteFileSecurityException,
                      RemoteFileIOException
Rename the given remote file or folder. This renames it in memory and, iff it exists, on disk.

Parameters:
folderOrFile - represents the object to be renamed.
newName - new name to give it.
Returns:
false if the given folder/file didn't exist on disk (still renamed in memory), else true. Throws an exception if anything fails.
Throws:
RemoteFileSecurityException
RemoteFileIOException

move

public boolean move(IRemoteFile sourceFolderOrFile,
                    IRemoteFile targetFolder,
                    String newName,
                    IProgressMonitor monitor)
             throws RemoteFileSecurityException,
                    RemoteFileIOException
Move a file or folder to a new target parent folder.

Parameters:
sourceFolderOrFile - The file or folder to move
targetFolder - 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 folder
monitor - progress monitor
Returns:
false true iff the move succeeded
Throws:
RemoteFileSecurityException
RemoteFileIOException

setLastModified

public boolean setLastModified(IRemoteFile folderOrFile,
                               long newDate)
                        throws RemoteFileSecurityException,
                               RemoteFileIOException
Set the last modified date for the given file or folder. Like a Unix "touch" operation. Folder or file must exist on disk for this to succeed.

Parameters:
folderOrFile - represents the object to be renamed.
newDate - new date, in milliseconds from epoch, to assign.
Returns:
false if the given folder/file didn't exist on disk (operation fails), else true. Throws an exception if anything fails.
Throws:
RemoteFileSecurityException
RemoteFileIOException

setReadOnly

public boolean setReadOnly(IRemoteFile folderOrFile)
                    throws RemoteFileSecurityException,
                           RemoteFileIOException
Set a file to readonly. Folder or file must exist on disk for this to succeed.

Parameters:
folderOrFile - represents the object to be renamed.
Returns:
false if the given folder/file didn't exist on disk (operation fails), else true. Throws an exception if anything fails.
Throws:
RemoteFileSecurityException
RemoteFileIOException

copy

public boolean copy(IRemoteFile sourceFolderOrFile,
                    IRemoteFile targetFolder,
                    String newName,
                    IProgressMonitor monitor)
             throws RemoteFileSecurityException,
                    RemoteFileIOException
Copy a file or folder to a new target parent folder.

Parameters:
sourceFolderOrFile - The file or folder to copy
targetFolder - 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 folder
Returns:
false true iff the copy succeeded
Throws:
RemoteFileSecurityException
RemoteFileIOException

copyBatch

public boolean copyBatch(IRemoteFile[] sourceFolderOrFile,
                         IRemoteFile targetFolder,
                         IProgressMonitor monitor)
                  throws RemoteFileSecurityException,
                         RemoteFileIOException
Copy a set of remote files or folders to a new target parent folder. Precondition: Sources and target must all be on the same system!

Parameters:
targetFolder - The folder to copy to.
Returns:
false true iff all copies succeeded
Throws:
RemoteFileSecurityException
RemoteFileIOException

download

public void download(IRemoteFile source,
                     String destination,
                     IProgressMonitor monitor)
              throws RemoteFileSecurityException,
                     RemoteFileIOException
Get the remote file and save it locally. The file is saved in the encoding of the operating system. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - remote file that represents the file to be obtained
destination - the absolute path of the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

download

public void download(IRemoteFile source,
                     String destination,
                     String encoding,
                     IProgressMonitor monitor)
              throws RemoteFileSecurityException,
                     RemoteFileIOException
Get the remote file and save it locally. The file is saved in the encoding specified. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - remote file that represents the file to be obtained
destination - the absolute path of the local file
encoding - the encoding of the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

downloadUTF8

public void downloadUTF8(IRemoteFile source,
                         String destination,
                         IProgressMonitor monitor)
                  throws RemoteFileSecurityException,
                         RemoteFileIOException
Get the remote file and save it locally. The file is saved in UTF-8 encoding. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification. This is a recommended method to use for file transfer.

Parameters:
source - remote file that represents the file to be obtained
destination - the absolute path of the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

download

public void download(IRemoteFile source,
                     File destination,
                     IProgressMonitor monitor)
              throws RemoteFileSecurityException,
                     RemoteFileIOException
Get the remote file and save it locally. The file is saved in the encoding of the operating system. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - remote file that represents the file to be obtained
destination - the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

download

public void download(IRemoteFile source,
                     File destination,
                     String encoding,
                     IProgressMonitor monitor)
              throws RemoteFileSecurityException,
                     RemoteFileIOException
Get the remote file and save it locally. The file is saved in the encoding specified. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - remote file that represents the file to be obtained
destination - the local file
encoding - the encoding of the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

downloadUTF8

public void downloadUTF8(IRemoteFile source,
                         File destination,
                         IProgressMonitor monitor)
                  throws RemoteFileSecurityException,
                         RemoteFileIOException
Get the remote file and save it locally. The file is saved in UTF-8 encoding. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification. This is a recommended method to use for file transfer.

Parameters:
source - remote file that represents the file to be obtained
destination - the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

download

public void download(IRemoteFile source,
                     IFile destination,
                     IProgressMonitor monitor)
              throws RemoteFileSecurityException,
                     RemoteFileIOException
Get the remote file and save it locally. The file is saved in the encoding of the operating system. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - remote file that represents the file to be obtained
destination - the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

download

public void download(IRemoteFile source,
                     IFile destination,
                     String encoding,
                     IProgressMonitor monitor)
              throws RemoteFileSecurityException,
                     RemoteFileIOException
Get the remote file and save it locally. The file is saved in the encoding specified. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - remote file that represents the file to be obtained
destination - the local file
encoding - the encoding of the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

downloadUTF8

public void downloadUTF8(IRemoteFile source,
                         IFile destination,
                         IProgressMonitor monitor)
                  throws RemoteFileSecurityException,
                         RemoteFileIOException
Get the remote file and save it locally. The file is saved in UTF-8 encoding. Two exceptions: if the remote file is binary, encoding does not apply. If the remote file is a XML file, then it will be copied to local in the encoding specified in the XML declaration, or as determined from the XML specification. This is a recommended method to use for file transfer.

Parameters:
source - remote file that represents the file to be obtained
destination - the local file
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(String source,
                   IRemoteFile destination,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding of the local operating system. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the absolute path of the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(String source,
                   IRemoteFile destination,
                   String encoding,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding specified. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the absolute path of the local copy
destination - remote file that represents the file on the server
encoding - the encoding of the local copy
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(InputStream stream,
                   long totalBytes,
                   IRemoteFile destination,
                   String encoding,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put local data to a remote location. The local data is assumed to be in the encoding specified.

Parameters:
stream - the input stream containing the local data.
totalBytes - the total number of bytes in the stream, or -1 if unknown. If -1 is specified, then the progress monitor must be null.
destination - remote file that represents the file on the server.
encoding - the encoding of the local data, or null to specify binary.
monitor - the progress monitor.
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(String source,
                   String destination,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding of the local operating system. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the absolute path of the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(String source,
                   String srcEncoding,
                   String remotePath,
                   String rmtEncoding,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding of the local operating system. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the absolute path of the local copy
srcEncoding - the encoding of the local copy
remotePath - remote file that represents the file on the server
rmtEncoding - the encoding of the remote file.
Throws:
RemoteFileSecurityException
RemoteFileIOException

uploadUTF8

public void uploadUTF8(String source,
                       IRemoteFile destination,
                       IProgressMonitor monitor)
                throws RemoteFileSecurityException,
                       RemoteFileIOException
Put the local copy of the remote file back to the remote location. The local file must be in UTF-8 encoding. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the absolute path of the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(File source,
                   IRemoteFile destination,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding of the local operating system. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(File source,
                   IRemoteFile destination,
                   String encoding,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding specified. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the local copy
destination - remote file that represents the file on the server
encoding - the encoding of the local copy
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

uploadUTF8

public void uploadUTF8(File source,
                       IRemoteFile destination,
                       IProgressMonitor monitor)
                throws RemoteFileSecurityException,
                       RemoteFileIOException
Put the local copy of the remote file back to the remote location. The local file must be in UTF-8 encoding. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(IFile source,
                   IRemoteFile destination,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding of the local operating system. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

upload

public void upload(IFile source,
                   IRemoteFile destination,
                   String encoding,
                   IProgressMonitor monitor)
            throws RemoteFileSecurityException,
                   RemoteFileIOException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding specified

Parameters:
source - the local copy
destination - remote file that represents the file on the server
encoding - the encoding of the local copy
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

uploadUTF8

public void uploadUTF8(IFile source,
                       IRemoteFile destination,
                       IProgressMonitor monitor)
                throws RemoteFileSecurityException,
                       RemoteFileIOException
Put the local copy of the remote file back to the remote location. The local file must be in UTF-8 encoding. Two exceptions: if the local file is binary, encoding does not apply. If the local file is a XML file, then it will be copied to remote in the encoding specified in the XML declaration, or as determined from the XML specification.

Parameters:
source - the local copy
destination - remote file that represents the file on the server
monitor - the progress monitor
Throws:
RemoteFileSecurityException
RemoteFileIOException

getHomeFolder

public String getHomeFolder()
Returns:
The value of the HomeFolder attribute

setHomeFolder

public void setHomeFolder(String value)
Parameters:
value - The new value of the HomeFolder attribute

getLanguageUtilityFactory

public org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory getLanguageUtilityFactory()
Returns a language utility factory associated with this subsystem.

Returns:
the language utility factory associated with this subsystem.

getUnusedPort

public int getUnusedPort()
Returns an unused port number on the remote host that could be used by any tool on the host.

Returns:
an unused port number on the host, or -1 if none could be found.

listRoots

public IRemoteFile[] listRoots(IRemoteFileContext context,
                               IProgressMonitor monitor)
                        throws InterruptedException
Return a list of roots/drives on the remote system. This version is called by RemoteFileSubSystemImpl's resolveFilterString(s) noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point

Throws:
InterruptedException

getLocalAddress

public InetAddress getLocalAddress()
Returns the TCP/IP address for the local system that is accessible from the remote server. If the local system has multiple IP addresses (because of multiple network cards or VPN), then this will return the address that the remote system can use to "call back" to the PC. There must be a network connection between the local system and the remote system for this method to work. If no network connection exists, then this method returns null.

Returns:
the local TCP/IP address accessible from the remote system, or null if no address can be resolved.

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.