|
|
|
|
org.eclipse.rse.services.files
Interface IFileService
-
All Superinterfaces:
-
IAdaptable,
IService
-
All Known Implementing Classes:
-
AbstractFileService
-
public interface IFileService
- extends
IService
A IFileService is an abstraction of a file service that runs over some sort
of connection. It can be shared among multiple instances of a subsystem. At
some point this file service layer may become official API but for now it is
experimental. Each subsystem is currently responsible for layering an
abstraction over whatever it wants to construct as a service.
This is a very bare bones definition. A real definition would probably have
changed terminology, use URI's rather than Strings, and have much more robust
error handling.
Implementers of this interface will have to either be instantiated,
initialized, or somehow derive a connection as part of its state.
Field Summary
|
static int
|
APPEND
Options constant (value 1 <<0) for specifying a stream that will
append data to a file. |
static int
|
FILE_TYPE_FILES
Query constant (bit mask value 1) which indicates that a query should be
on files. |
static int
|
FILE_TYPE_FILES_AND_FOLDERS
Query constant (bit mask value 0) which indicates that a query should
produce folders and files. |
static int
|
FILE_TYPE_FOLDERS
Query constant (bit mask value 2) which indicates that a query should be
on folders. |
static int
|
NONE
Options constant (value 0) to indicate that no bit options are set. |
static int
|
TEXT_MODE
Options constant (value 2 <<0) for specifying that a file is Text
instead of the default Binary. |
Method Summary
|
void
|
copy
(
String srcParent,
String srcName,
String tgtParent,
String tgtName,
IProgressMonitor monitor)
Copy the file or folder to the specified destination. |
void
|
copyBatch
(
String[] srcParents,
String[] srcNames,
String tgtParent,
IProgressMonitor monitor)
Copy a set of files or folders to the specified destination. |
IHostFile
|
createFile
(
String remoteParent,
String fileName,
IProgressMonitor monitor)
Create a file on the host. |
IHostFile
|
createFolder
(
String remoteParent,
String folderName,
IProgressMonitor monitor)
Create a folder on the host. |
void
|
delete
(
String remoteParent,
String fileName,
IProgressMonitor monitor)
Delete a file or folder on the host. |
void
|
deleteBatch
(
String[] remoteParents,
String[] fileNames,
IProgressMonitor monitor)
Delete a set of files or folders on the host. |
void
|
download
(
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String hostEncoding,
IProgressMonitor monitor)
Copy a file from the remote file system to the local system. |
void
|
downloadMultiple
(
String[] remoteParents,
String[] remoteFiles,
File[] localFiles,
boolean[] isBinary,
String[] hostEncodings,
IProgressMonitor monitor)
Copy files from the remote file system to the local system. |
String
|
getEncoding
(
IProgressMonitor monitor)
Gets the remote encoding. |
IHostFile
|
getFile
(
String remoteParent,
String name,
IProgressMonitor monitor)
Get an abstract remote file handle for a specified path. |
void
|
getFileMultiple
(
String[] remoteParents,
String[] names,
List hostFiles,
IProgressMonitor monitor)
Get multiple abstract remote file handles for an array of specified
paths. |
InputStream
|
getInputStream
(
String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
Get the input stream to access the contents a remote file. |
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)
Get the output stream to write/append to a remote file. |
IHostFile[]
|
getRoots
(
IProgressMonitor monitor)
Get abstract remote file handles for the known remote file system roots. |
IHostFile
|
getUserHome
()
Return the user's home directory on this connection. |
boolean
|
isCaseSensitive
()
Indicates whether the file system is case sensitive. |
IHostFile[]
|
list
(
String remoteParent,
String fileFilter,
int fileType,
IProgressMonitor monitor)
List the contents of a remote folder. |
void
|
listMultiple
(
String[] remoteParents,
String[] fileFilters,
int[] fileTypes,
List hostFiles,
IProgressMonitor monitor)
List the contents of multiple remote folders. |
void
|
listMultiple
(
String[] remoteParents,
String[] fileFilters,
int fileType,
List hostFiles,
IProgressMonitor monitor)
List the contents of multiple remote folders. |
void
|
move
(
String srcParent,
String srcName,
String tgtParent,
String tgtName,
IProgressMonitor monitor)
Move the file or folder specified to a different remote path. |
void
|
rename
(
String remoteParent,
String oldName,
String newName,
IHostFile oldFile,
IProgressMonitor monitor)
Rename a file or folder on the host. |
void
|
rename
(
String remoteParent,
String oldName,
String newName,
IProgressMonitor monitor)
Rename a file or folder on the host. |
void
|
setLastModified
(
String parent,
String name,
long timestamp,
IProgressMonitor monitor)
Set the last modified stamp of the file or folder with the specified
timestamp. |
void
|
setReadOnly
(
String parent,
String name,
boolean readOnly,
IProgressMonitor monitor)
Set the read-only permission of the specified file or folder. |
boolean
|
supportsEncodingConversion
()
Indicates whether this file service supports code page conversion using
the IFileServiceCodePageConverter mechanism. |
void
|
upload
(
File localFile,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding,
IProgressMonitor monitor)
Copy a file to the remote file system. |
void
|
upload
(
InputStream stream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding,
IProgressMonitor monitor)
Copy a file to the remote file system. |
void
|
uploadMultiple
(
File[] localFiles,
String[] remoteParents,
String[] remoteFiles,
boolean[] isBinary,
String[] srcEncodings,
String[] hostEncodings,
IProgressMonitor monitor)
Copy files to the remote file system. |
FILE_TYPE_FILES
static final int FILE_TYPE_FILES
- Query constant (bit mask value 1) which indicates that a query should be
on files. The filter(s) passed into the list methods will produce a
subset of files matching the filter(s).
This constant is passed into the IFileService list calls. Implementors of
IFileService make use of this to determine what to query and what to
return from the query.
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
list(String,String,int,IProgressMonitor) ,
listMultiple(String[],String[],int,List,IProgressMonitor) ,
listMultiple(String[],String[],int[],List,IProgressMonitor) ,
Constant Field Values
FILE_TYPE_FOLDERS
static final int FILE_TYPE_FOLDERS
- Query constant (bit mask value 2) which indicates that a query should be
on folders. The filter(s) passed into the list methods will produce a
subset of folders matching the filter(s).
This constant is passed into the IFileService list calls. Implementors of
IFileService make use of this to determine what to query and what to
return from the query.
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
list(String,String,int,IProgressMonitor) ,
listMultiple(String[],String[],int,List,IProgressMonitor) ,
listMultiple(String[],String[],int[],List,IProgressMonitor) ,
Constant Field Values
FILE_TYPE_FILES_AND_FOLDERS
static final int FILE_TYPE_FILES_AND_FOLDERS
- Query constant (bit mask value 0) which indicates that a query should
produce folders and files. The filter(s) passed into the list methods
will produce a subset of files matching the filter(s) and all the
folders. Note that only files are filtered and all folders are returned
when this is used.
This constant is passed into the IFileService list calls. Implementors of
IFileService make use of this to determine what to query and what to
return from the query.
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
list(String,String,int,IProgressMonitor) ,
listMultiple(String[],String[],int,List,IProgressMonitor) ,
listMultiple(String[],String[],int[],List,IProgressMonitor) ,
Constant Field Values
APPEND
static final int APPEND
- Options constant (value 1 <<0) for specifying a stream that will
append data to a file.
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
getOutputStream(String, String, int, IProgressMonitor) ,
Constant Field Values
TEXT_MODE
static final int TEXT_MODE
- Options constant (value 2 <<0) for specifying that a file is Text
instead of the default Binary.
In Text mode, encoding conversions and line end conversions can be
performed on the stream.
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
getOutputStream(String, String, int, IProgressMonitor) ,
Constant Field Values
NONE
static final int NONE
- Options constant (value 0) to indicate that no bit options are set.
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
Constant Field Values
upload
void upload(
InputStream stream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy a file to the remote file system. The remote target is denoted by a
string representing the parent and a string representing the file.
-
-
-
Parameters:
-
stream - input stream to transfer -
remoteParent - - a string designating the parent folder of the target for this file. -
remoteFile - - a string designating the name of the file to be written on the remote system. -
isBinary - - indicates whether the file is text or binary -
hostEncoding - - the tgt encoding of the file (if text) -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs.
Typically this would be one of those in the RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
upload
void upload(
File localFile,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy a file to the remote file system. The remote target is denoted by a
string representing the parent and a string representing the file.
-
-
-
Parameters:
-
localFile - - a real file in the local file system. -
remoteParent - - a string designating the parent folder of the target for this file. -
remoteFile - - a string designating the name of the file to be written on the remote system. -
isBinary - - indicates whether the file is text or binary -
srcEncoding - - the src encoding of the file (if text) -
hostEncoding - - the tgt encoding of the file (if text) -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
uploadMultiple
void uploadMultiple(
File[] localFiles,
String[] remoteParents,
String[] remoteFiles,
boolean[] isBinary,
String[] srcEncodings,
String[] hostEncodings,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy files to the remote file system. The remote target is denoted by
strings representing the parents and strings representing the files.
If an error occurs during the upload of a file, this operation stops on that file and a
SystemMessageException is thrown.
Files uploaded before that file will remain uploaded. Files in the list after that file will not be uploaded.
The file on which the error occurs will not be uploaded.
-
-
-
Parameters:
-
localFiles - - real files in the local file system. -
remoteParents - - strings designating the parent folders of the target for the files. -
remoteFiles - - strings designating the names of the files to be written on the remote system. -
isBinary - - indicates whether the files are text or binary -
srcEncodings - - the src encodings of the files (if text) -
hostEncodings - - the tgt encodings of the files (if text) -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
download
void download(
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String hostEncoding,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy a file from the remote file system to the local system.
-
-
-
Parameters:
-
remoteParent - - a String designating the remote parent. -
remoteFile - - a String designating the remote file residing in the parents. -
localFile - - The file that is to be written. If the file exists it is
overwritten. -
isBinary - - indicates whether the file is text on binary -
hostEncoding - - the encoding on the host (if text) -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
downloadMultiple
void downloadMultiple(
String[] remoteParents,
String[] remoteFiles,
File[] localFiles,
boolean[] isBinary,
String[] hostEncodings,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy files from the remote file system to the local system.
If an error occurs during the download of a file, this operation stops on that file and a
SystemMessageException is thrown.
Files downloaded before that file will remain downloaded. Files in the list after that file will not be downloaded.
The file on which the error occurs will not be downloaded.
-
-
-
Parameters:
-
remoteParents - - string designating the remote parents. -
remoteFiles - - Strings designating the remote files residing in the
parents. -
localFiles - - The files that are to be written. If the files exists
they are overwritten. -
isBinary - - indicates whether the files are text on binary -
hostEncodings - - the encodings on the host (if text) -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the
RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
getFile
IHostFile getFile(
String remoteParent,
String name,
IProgressMonitor monitor)
throws
SystemMessageException
- Get an abstract remote file handle for a specified path.
-
-
-
Parameters:
-
remoteParent - the name of the parent directory on the remote file
system from which to retrieve the file. -
name - the name of the file to be retrieved. -
monitor - the monitor for this potentially long running operation
-
Returns:
- the host file given the parent path and file name. Must not
return
null , non-existing files should be
reported with an IHostFile object where
IHostFile.exists() returns false .
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family.
list
IHostFile[] list(
String remoteParent,
String fileFilter,
int fileType,
IProgressMonitor monitor)
throws
SystemMessageException
- List the contents of a remote folder.
-
-
-
Parameters:
-
remoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list. -
fileFilter - - a string that can be used to filter the children.
Only those files matching the filter make it into the list.
The interface does not dictate where the filtering occurs. -
fileType - - indicates whether to query files, folders, both or some
other type -
monitor - the monitor for this potentially long running operation
-
Returns:
- the list of host files.
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
getFileMultiple
void getFileMultiple(
String[] remoteParents,
String[] names,
List hostFiles,
IProgressMonitor monitor)
throws
SystemMessageException
- Get multiple abstract remote file handles for an array of specified
paths.
If an error occurs during the retrieval an item, this operation stops on that item and a
SystemMessageException is thrown.
Items retrieved before that item will be returned. Items to be retrieved after that item will not be retrieved.
The items on which the error occurs will not be retrieved.
-
-
-
Parameters:
-
remoteParents - - the list of remote parents -
names - - the list of file names -
hostFiles - a list to which the retrieved
IHostFile objects will be appended -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
listMultiple
void listMultiple(
String[] remoteParents,
String[] fileFilters,
int[] fileTypes,
List hostFiles,
IProgressMonitor monitor)
throws
SystemMessageException
- List the contents of multiple remote folders.
If an error occurs during the retrieval of the contents of a folder, this operation stops on that folder and a
SystemMessageException is thrown.
Items retrieved before that folder will be returned. Items in folders after that folder will not be retrieved.
The items in the folder on which the error occurs will not be returned.
-
-
-
Parameters:
-
remoteParents - - the names of the parent directories on the remote
file system from which to retrieve the collective child list. -
fileFilters - - a set of strings that can be used to filter the
children. Only those files matching the filter corresponding
to it's remoteParent make it into the list. The interface does
not dictate where the filtering occurs. For each remoteParent,
there must be a corresponding fileFilter. -
fileTypes - - indicates whether to query files, folders, both or
some other type. For each remoteParent, there must be a
corresponding fileType. For the default list of available file
types see IFileServiceContants
-
hostFiles - a list to which the found
IHostFile objects will be appended -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
listMultiple
void listMultiple(
String[] remoteParents,
String[] fileFilters,
int fileType,
List hostFiles,
IProgressMonitor monitor)
throws
SystemMessageException
- List the contents of multiple remote folders.
If an error occurs during the retrieval of the contents of a folder, this operation stops on that folder and a
SystemMessageException is thrown.
Items retrieved before that folder will be returned. Items in folders after that folder will not be retrieved.
The items in the folder on which the error occurs will not be returned.
-
-
-
Parameters:
-
remoteParents - - the names of the parent directories on the remote
file system from which to retrieve the collective child list. -
fileFilters - - a set of strings that can be used to filter the
children. Only those files matching the filter corresponding
to it's remoteParent make it into the list. The interface does
not dictate where the filtering occurs. For each remoteParent,
there must be a corresponding fileFilter. -
fileType - - indicates whether to query files, folders, both or some
other type. All results will be of the specified type. For the
default list of available file types see
IFileServiceContants
-
hostFiles - a list to which the found
IHostFile objects will be appended -
monitor - the monitor for this potentially long running operation
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family. -
Since:
- org.eclipse.rse.services 3.0
getRoots
IHostFile[] getRoots(
IProgressMonitor monitor)
throws
SystemMessageException
- Get abstract remote file handles for the known remote file system roots.
-
-
-
Parameters:
-
monitor - the monitor for this potentially long running operation
Return the list of roots for this system
-
Returns:
- the list of host files.
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family.
getUserHome
IHostFile getUserHome()
- Return the user's home directory on this connection.
The resulting IHostFile object is just a handle, so there is no guarantee
that it refers to an existing file.
This method may also return
null if the home directory could
not be determined (for instance, because the connection is not yet connected).
In this case, clients are encouraged to query the home directory again once
the connection is connected.
-
-
-
Returns:
- A handle to the current user's home directory, or
null
if the home directory could not be determined.
createFile
IHostFile createFile(
String remoteParent,
String fileName,
IProgressMonitor monitor)
throws
SystemMessageException
- Create a file on the host.
-
-
-
Parameters:
-
remoteParent - the parent directory -
fileName - the name of the new file -
monitor - the monitor for this potentially long running operation
-
Returns:
- the newly created file
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family.
createFolder
IHostFile createFolder(
String remoteParent,
String folderName,
IProgressMonitor monitor)
throws
SystemMessageException
- Create a folder on the host.
Implementations are free to create missing parent folders or fail with a
SystemMessageException if the parent folder does not yet exist. In
general, creating missing parent folders is recommended if it doesn't
require additional client-server round trips. Therefore the "Local" and
"DStore" services do create missing parent folders.
-
-
-
Parameters:
-
remoteParent - the parent directory -
folderName - the name of the new folder -
monitor - the progress monitor
-
Returns:
- the newly created folder
-
Throws:
-
SystemMessageException
- if an error occurs. Typically this would
be one of those in the RemoteFileException family.
delete
void delete(
String remoteParent,
String fileName,
IProgressMonitor monitor)
throws
SystemMessageException
- Delete a file or folder on the host.
-
-
-
Parameters:
-
remoteParent - the folder containing the file to delete -
fileName - the name of the file or folder to delete -
monitor - the progress monitor
-
Throws:
-
SystemMessageException
- if an error occurs or the user canceled
the operation. SystemElementNotFoundException is thrown if the remote
file doesn't exist. -
Since:
- org.eclipse.rse.services 3.0
deleteBatch
void deleteBatch(
String[] remoteParents,
String[] fileNames,
IProgressMonitor monitor)
throws
SystemMessageException
- Delete a set of files or folders on the host. 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.
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.
-
-
-
Parameters:
-
remoteParents - the array of folders containing the files to delete -
fileNames - the names of the files or folders to delete -
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.services 3.0
rename
void rename(
String remoteParent,
String oldName,
String newName,
IProgressMonitor monitor)
throws
SystemMessageException
- Rename a file or folder on the host.
-
-
-
Parameters:
-
remoteParent - the folder containing the file to rename -
oldName - the old name of the file or folder to rename -
newName - the new name for the file -
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.services 3.0
rename
void rename(
String remoteParent,
String oldName,
String newName,
IHostFile oldFile,
IProgressMonitor monitor)
throws
SystemMessageException
- Rename a file or folder on the host.
-
-
-
Parameters:
-
remoteParent - the folder containing the file to rename -
oldName - the old name of the file or folder to rename -
newName - the new name for the file -
oldFile - the file to update with the change -
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.services 3.0
move
void move(
String srcParent,
String srcName,
String tgtParent,
String tgtName,
IProgressMonitor monitor)
throws
SystemMessageException
- Move the file or folder specified to a different remote path.
-
-
-
Parameters:
-
srcParent - the folder containing the file or folder to move -
srcName - the new of the file or folder to move -
tgtParent - the destination folder for the move -
tgtName - the name of the moved file or folder -
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.services 3.0
copy
void copy(
String srcParent,
String srcName,
String tgtParent,
String tgtName,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy the file or folder to the specified destination.
-
-
-
Parameters:
-
srcParent - the folder containing the file or folder to copy -
srcName - the new of the file or folder to copy -
tgtParent - the destination folder for the copy -
tgtName - the name of the copied file or folder -
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.services 3.0
copyBatch
void copyBatch(
String[] srcParents,
String[] srcNames,
String tgtParent,
IProgressMonitor monitor)
throws
SystemMessageException
- Copy a set of files or folders to the specified destination.
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:
-
srcParents - the folders containing each file or folder to copy -
srcNames - the names of the files or folders to copy -
tgtParent - the destination folder for the copy -
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.services 3.0
isCaseSensitive
boolean isCaseSensitive()
- Indicates whether the file system is case sensitive.
-
-
-
Returns:
- true if the file system has case sensitive file names
setLastModified
void setLastModified(
String parent,
String name,
long timestamp,
IProgressMonitor monitor)
throws
SystemMessageException
- Set the last modified stamp of the file or folder with the specified
timestamp.
Note that the precision to which the underlying file system supports last
modified times may vary. Therefore, even if this method successfully sets
the timestamp, there is no guarantee that the
IHostFile.getModifiedDate() method after a following
getFile(String, String, IProgressMonitor) call returns exactly
the same timestamp.
-
-
-
Parameters:
-
parent - the parent path of the file to set -
name - the name of the file to set -
timestamp - the new timestamp in milliseconds from January 1, 1970,
00:00:00 UTC. -
monitor - the progress monitor
-
Throws:
-
SystemMessageException
-
Since:
- org.eclipse.rse.services 3.0
-
See Also:
-
IHostFile.getModifiedDate()
setReadOnly
void setReadOnly(
String parent,
String name,
boolean readOnly,
IProgressMonitor monitor)
throws
SystemMessageException
- Set the read-only permission of the specified file or folder.
-
-
-
Parameters:
-
parent - the parent path of the file to set -
name - the name of the file to set -
readOnly - indicates whether to make the file read-only or
read-write -
monitor - the progress monitor
-
Throws:
-
SystemMessageException
-
Since:
- org.eclipse.rse.services 3.0
getEncoding
String getEncoding(
IProgressMonitor monitor)
throws
SystemMessageException
- Gets the remote encoding.
-
-
-
Parameters:
-
monitor - the progress monitor.
-
Returns:
- the encoding.
-
Throws:
-
SystemMessageException
- if an error occurs. -
Since:
- 2.0
getInputStream
InputStream getInputStream(
String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
throws
SystemMessageException
- Get the input stream to access the contents a remote file. Clients should
close the input stream when done.
-
-
-
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:
- org.eclipse.rse.services 2.0
getOutputStream
OutputStream getOutputStream(
String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
throws
SystemMessageException
-
Deprecated. Use
getOutputStream(String, String, int, IProgressMonitor)
instead
- Get the output stream to write to a remote file. Clients should close the
output stream when done.
-
-
-
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:
- org.eclipse.rse.services 2.0
getOutputStream
OutputStream getOutputStream(
String remoteParent,
String remoteFile,
int options,
IProgressMonitor monitor)
throws
SystemMessageException
- Get the output stream to write/append to a remote file. Clients should
close the output stream when done.
-
-
-
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
APPEND ,
TEXT_MODE ,
and
NONE
-
monitor - the progress monitor.
-
Returns:
- the input stream to access the contents of the remote file.
-
Throws:
-
SystemMessageException
- if an error occurs. -
Since:
- org.eclipse.rse.services 3.0
supportsEncodingConversion
boolean supportsEncodingConversion()
- Indicates whether this file service 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:
- org.eclipse.rse.services 3.0
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|
|