Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

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

All Superinterfaces:
IPropertySetContainer, IRemoteObjectResolver, IRSEModelObject, IRSEPersistableContainer, ISchedulingRule, ISubSystem, ISystemFilterPoolReferenceManagerProvider
All Known Subinterfaces:
IFileServiceSubSystem
All Known Implementing Classes:
FileServiceSubSystem, RemoteFileSubSystem

public interface IRemoteFileSubSystem
extends ISubSystem

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. ISubSystem
canSwitchTo, checkIsConnected, clearLocalUserId, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getCacheManager, getChildren, getConfigurationId, getConnectorService, getFilterPoolReferenceManager, getHost, getHostAliasName, getLocalUserId, getName, getPrimarySubSystem, getProperties, getProperty, getServiceType, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUserId, getVendorAttribute, hasChildren, initializeSubSystem, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterStrings, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setSubSystemConfiguration, setVendorAttribute, supportsCaching, switchServiceFactory, 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, 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

getParentRemoteFileSubSystemConfiguration


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


isCaseSensitive

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


getSeparator


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


getSeparatorChar

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


getPathSeparator


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


getPathSeparatorChar

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


getLineSeparator


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


listRoots


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

listMultiple


IRemoteFile[] listMultiple(
IRemoteFile[] parents,
                           int[] fileTypes,
                           
IProgressMonitor monitor)
                           throws 
SystemMessageException
Return a list of all remote folders and/or files in the given folders. This list is not filtered.

Parameters:
parents - The parent folders to list folders and/or files in
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
Throws:
SystemMessageException
Since:
3.0

listMultiple


IRemoteFile[] listMultiple(
IRemoteFile[] parents,
                           
String[] fileNameFilters,
                           int[] fileTypes,
                           
IProgressMonitor monitor)
                           throws 
SystemMessageException
Return a list of remote folders and/or files in the given folder. Only file names are filtered by the given file name filters. It can be null for no sub-setting.

Parameters:
parents - The parent folders to list folders and files in
fileNameFilters - 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
Throws:
SystemMessageException
Since:
3.0

listMultiple


IRemoteFile[] listMultiple(
IRemoteFile[] parents,
                           int fileType,
                           
IProgressMonitor monitor)
                           throws 
SystemMessageException
Return a list of all remote folders and/or files in the given folders. This list is not filtered.

Parameters:
parents - The parent folders to list folders and/or files in
fileType - - 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
Throws:
SystemMessageException
Since:
3.0

listMultiple


IRemoteFile[] listMultiple(
IRemoteFile[] parents,
                           
String[] fileNameFilters,
                           int fileType,
                           
IProgressMonitor monitor)
                           throws 
SystemMessageException
Return a list of remote folders and/or files in the given folder. Only file names are filtered by the given file name filters. It can be null for no sub-setting.

Parameters:
parents - The parent folders to list folders and files in
fileNameFilters - 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
Throws:
SystemMessageException
Since:
3.0

list


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

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

list


IRemoteFile[] list(
IRemoteFile parent,
                   int fileType,
                   
IProgressMonitor monitor)
                   throws 
SystemMessageException
Return a list of all remote folders and/or files in the given folder. The list is not filtered.

Parameters:
parent - The parent folder to list folders and files in
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
Throws:
SystemMessageException
Since:
3.0

list


IRemoteFile[] list(
IRemoteFile parent,
                   
String fileNameFilter,
                   int fileType,
                   
IProgressMonitor monitor)
                   throws 
SystemMessageException
Return a list of remote folders and/or files in the given folder. Only file names are filtered by the given file name filter. It can be null for no filtering.

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.
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
Throws:
SystemMessageException
Since:
3.0

list


IRemoteFile[] list(
IRemoteFile parent,
                   
String fileNameFilter,
                   
IRemoteFileContext context,
                   int fileType,
                   
IProgressMonitor monitor)
                   throws 
SystemMessageException
Return a list of remote folders and/or files in the given folder. The files part of the list is filtered by the given file name filter. It can be null for no filtering.

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 - indicates whether to query files, folders, both or some other type
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
Throws:
SystemMessageException
Since:
3.0

search

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

Parameters:
searchConfig - a search configuration.

cancelSearch

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

Parameters:
searchConfig - a search configuration.

getParentFolder


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

Parameters:
folderOrFile - folder or file to return parent of.
monitor - the progress monitor
Returns:
the remote file

getParentFolderName


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


String getRemoteEncoding()
Returns the encoding of the remote system.

Returns:
the encoding of the remote system.

getRemoteFileObjects


IRemoteFile[] getRemoteFileObjects(
String[] folderOrFileNames,
                                   
IProgressMonitor monitor)
                                   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
monitor - the progress monitor
Returns:
the set of resources
Throws:
SystemMessageException
Since:
3.0

getRemoteFileObject


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

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.

Parameters:
folderOrFileName - Fully qualified folder or file name.
monitor - the progress monitor
Returns:
the requested IRemoteFile object.
Throws:
SystemMessageException - in case an error occurs contacting the remote system while retrieving the requested remote object.

getRemoteFileObject


IRemoteFile getRemoteFileObject(
IRemoteFile parent,
                                
String folderOrFileName,
                                
IProgressMonitor monitor)
                                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
monitor - the progress monitor
Returns:
the requested IRemoteFile object
Throws:
SystemMessageException

getRemoteSearchResultObject


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


IRemoteFile createFile(
IRemoteFile fileToCreate,
                       
IProgressMonitor monitor)
                       throws 
SystemMessageException
Create a new file, given its IRemoteFile object (these do not have to represent existing files).

  • The parent folder must exist for this to succeed.
  • If this file already exists, this is a no-op.
  • If the given object is a folder, not a file, this is a no-op.

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:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
See Also:
createFolders(IRemoteFile,IProgressMonitor)

createFolder


IRemoteFile createFolder(
IRemoteFile folderToCreate,
                         
IProgressMonitor monitor)
                         throws 
SystemMessageException
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. If the parent folder does not yet exist, implementations are free to create missing parents or fail (see also IFileService.createFolder(String, String, IProgressMonitor)).
  • If this folder already exists, this is a no-op.
  • If the given object is a file, not a folder, this is a no-op.

Parameters:
folderToCreate - The object representing the folder to be created.
monitor - the progress monitor
Returns:
The same input object returned for convenience. Will throw exception if it fails.
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
See Also:
createFolders(IRemoteFile, IProgressMonitor)

createFolders


IRemoteFile createFolders(
IRemoteFile folderToCreate,
                          
IProgressMonitor monitor)
                          throws 
SystemMessageException
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.

  • If this folder already exists, this is a no-op.
  • If the given object is a file, not a folder, this is a no-op.

Parameters:
folderToCreate - The object representing the folder to be created, along with its parents.
monitor - the progress monitor
Returns:
The same input object returned for convenience. Will throw exception if it fails.
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
See Also:
getParentFolder(IRemoteFile, IProgressMonitor)

delete

void delete(
IRemoteFile folderOrFile,
            
IProgressMonitor monitor)
            throws 
SystemMessageException
Delete the given remote file or folder.
  • If the input is a folder, that folder must be empty for this to succeed.

Parameters:
folderOrFile - represents the object to be deleted.
monitor - progressMonitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

deleteBatch

void deleteBatch(
IRemoteFile[] folderOrFiles,
                 
IProgressMonitor monitor)
                 throws 
SystemMessageException
Delete the given batch of remote file or folder.
  • If any of the inputs are a folder, those folders must be empty for this to succeed.

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.

Parameters:
folderOrFiles - represents the objects to be deleted.
monitor - progressMonitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

rename

void rename(
IRemoteFile folderOrFile,
            
String newName,
            
IProgressMonitor monitor)
            throws 
SystemMessageException
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.
monitor - the progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

move

void move(
IRemoteFile sourceFolderOrFile,
          
IRemoteFile targetFolder,
          
String newName,
          
IProgressMonitor monitor)
          throws 
SystemMessageException
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
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

setLastModified

void setLastModified(
IRemoteFile folderOrFile,
                     long newDate,
                     
IProgressMonitor monitor)
                     throws 
SystemMessageException
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.
monitor - the progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

setReadOnly

void setReadOnly(
IRemoteFile folderOrFile,
                 boolean readOnly,
                 
IProgressMonitor monitor)
                 throws 
SystemMessageException
Set a files read-only permissions. Folder or file must exist on disk for this to succeed.

Parameters:
folderOrFile - represents the object to be renamed.
readOnly - whether to set it to be read-only or not
monitor - the progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

copy

void copy(
IRemoteFile sourceFolderOrFile,
          
IRemoteFile targetFolder,
          
String newName,
          
IProgressMonitor monitor)
          throws 
SystemMessageException
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
monitor - progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

copyBatch

void copyBatch(
IRemoteFile[] sourceFolderOrFile,
               
IRemoteFile targetFolder,
               
IProgressMonitor monitor)
               throws 
SystemMessageException
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.

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.

Parameters:
sourceFolderOrFile - The file or folder to copy
targetFolder - The folder to copy to.
monitor - progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
org.eclipse.rse.subsystems.files.core 3.0

download

void download(
IRemoteFile source,
              
String destination,
              
String encoding,
              
IProgressMonitor monitor)
              throws 
SystemMessageException
Get the remote file and save it locally. The file is saved in the encoding specified, with 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:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.

downloadMultiple

void downloadMultiple(
IRemoteFile[] sources,
                      
String[] destinations,
                      
String[] encodings,
                      
IProgressMonitor monitor)
                      throws 
SystemMessageException
Get the remote files and save them locally. The files are saved in the encodings specified, with two exceptions:
  • If a remote file is binary, encoding does not apply.
  • If a 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:
sources - remote files that represent the files to be obtained
destinations - the absolute paths of the local files
encodings - the encodings of the local files
monitor - the progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
3.0

upload

void upload(
String source,
            
IRemoteFile destination,
            
String encoding,
            
IProgressMonitor monitor)
            throws 
SystemMessageException
Put the local copy of the remote file back to the remote location. The file is assumed to be in the encoding specified, with 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:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.

upload

void upload(
String source,
            
String srcEncoding,
            
String remotePath,
            
String rmtEncoding,
            
IProgressMonitor monitor)
            throws 
SystemMessageException
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, with 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:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.

uploadMultiple

void uploadMultiple(
String[] sources,
                    
IRemoteFile[] destinations,
                    
String[] encodings,
                    
IProgressMonitor monitor)
                    throws 
SystemMessageException
Put the local copies of the remote files to the remote locations. The files are assumed to be in the encodings specified, with two exceptions:
  • If a local files is binary, encoding does not apply.
  • If a local files is an 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:
sources - the absolute paths of the local copies
destinations - remote files that represent the files on the server
encodings - the encodings of the local copies
monitor - the progress monitor
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
3.0

uploadMultiple

void uploadMultiple(
String[] sources,
                    
String[] srcEncodings,
                    
String[] remotePaths,
                    
String[] rmtEncodings,
                    
IProgressMonitor monitor)
                    throws 
SystemMessageException
Put the local copies of the remote files to the remote locations. The files are assumed to be in the encodings of the local operating system, with two exceptions:
  • If a local file is binary, encoding does not apply.
  • If a 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:
sources - the absolute paths of the local copies
srcEncodings - the encodings of the local copies
remotePaths - remote files that represents the files on the server
rmtEncodings - the encodings of the remote files.
Throws:
SystemMessageException - if an error occurs. Typically this would be one of those in the RemoteFileException family.
Since:
3.0

getLanguageUtilityFactory


ILanguageUtilityFactory getLanguageUtilityFactory()
Returns a language utility factory associated with this subsystem.

Returns:
the language utility factory associated with this subsystem.

getUnusedPort

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


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


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.

getInputStream


InputStream getInputStream(
String remoteParent,
                           
String remoteFile,
                           boolean isBinary,
                           
IProgressMonitor monitor)
                           throws 
SystemMessageException
Gets the input stream to access the contents a remote file. Clients should close the input stream when done. Implementations should not return null.

Parameters:
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.
Returns:
the input stream to access the contents of the remote file.
Throws:
SystemMessageException - if an error occurs.
Since:
2.0

getOutputStream


OutputStream getOutputStream(
String remoteParent,
                             
String remoteFile,
                             boolean isBinary,
                             
IProgressMonitor monitor)
                             throws 
SystemMessageException
Deprecated. Use getOutputStream(String, String, int, IProgressMonitor) instead

Gets the output stream to write to a remote file. Clients should close the output stream when done. Implementations should not return null.

Parameters:
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.
Returns:
the input stream to access the contents of the remote file.
Throws:
SystemMessageException - if an error occurs.
Since:
2.0

getOutputStream


OutputStream getOutputStream(
String remoteParent,
                             
String remoteFile,
                             int options,
                             
IProgressMonitor monitor)
                             throws 
SystemMessageException
Gets the output stream to write/append to a remote file. Clients should close the output stream when done. Implementations should not return null.

Parameters:
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.
Returns:
the input stream to access the contents of the remote file.
Throws:
SystemMessageException - if an error occurs.
Since:
3.0

supportsEncodingConversion

boolean supportsEncodingConversion()
Indicates whether this file subsystem supports code page conversion using the IFileServiceCodePageConverter mechanism. Certain extensions, such as property pages for encoding conversion can determine whether or not to display or enable themselves based on result of this call.

Returns:
whether this service supports encoding conversion
Since:
3.0

RSE
Release 3.0

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire