|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.services.files.AbstractFileService
org.eclipse.rse.services.files.ftp.FTPService
| Field Summary |
|---|
| Fields inherited from class org.eclipse.rse.services.files.AbstractFileService |
|---|
FILE_TYPE_FILES, FILE_TYPE_FILES_AND_FOLDERS, FILE_TYPE_FOLDERS |
| Constructor Summary | |
|---|---|
FTPService()
|
|
| Method Summary | |
|---|---|
void |
connect()
|
boolean |
copy(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
Copy the file or folder to the specified destination |
boolean |
copyBatch(IProgressMonitor monitor,
String[] srcParents,
String[] srcNames,
String tgtParent)
Copy a set of files or folders to the specified destination |
IHostFile |
createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
Create a file on the host |
IHostFile |
createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
Create a folder on the host |
boolean |
delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
Deletes a file or folder on the host |
void |
disconnect()
|
boolean |
download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String hostEncoding)
Copy a file from the remote file system to the local system. |
String |
getDescription()
|
IHostFile |
getFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
|
FTPClient |
getFTPClient()
Returns the commons.net FTPClient for this session. |
String |
getName()
|
IHostFile[] |
getRoots(IProgressMonitor monitor)
|
IHostFile |
getUserHome()
|
void |
initService(IProgressMonitor monitor)
|
protected IHostFile[] |
internalFetch(IProgressMonitor monitor,
String parentPath,
String fileFilter,
int fileType)
|
boolean |
isCaseSensitive()
Indicates whether the file system is case sensitive |
boolean |
isConnected()
|
boolean |
move(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
Move the file or folder specified |
boolean |
rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName)
Renames a file or folder on the host |
boolean |
rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName,
IHostFile oldFile)
Renames a file or folder on the host |
void |
setHostName(String hostname)
|
void |
setLoggingStream(OutputStream ftpLoggingOutputStream)
|
void |
setPassword(String password)
|
void |
setPortNumber(int portNumber)
|
void |
setUserId(String userId)
|
void |
uninitService(IProgressMonitor monitor)
|
boolean |
upload(IProgressMonitor monitor,
File localFile,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding)
Copy a file to the remote file system. |
boolean |
upload(IProgressMonitor monitor,
InputStream stream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding)
Copy a file to the remote file system. |
| Methods inherited from class org.eclipse.rse.services.files.AbstractFileService |
|---|
deleteBatch, getFiles, getFilesAndFolders, getFolders, getMessage, isRightType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.services.files.IFileService |
|---|
deleteBatch, getFiles, getFilesAndFolders, getFolders |
| Methods inherited from interface org.eclipse.rse.services.IService |
|---|
getMessage |
| Constructor Detail |
public FTPService()
| Method Detail |
public String getName()
getName in interface IServicepublic String getDescription()
getDescription in interface IServicepublic void setHostName(String hostname)
public void setPortNumber(int portNumber)
public void setUserId(String userId)
public void setPassword(String password)
public void setLoggingStream(OutputStream ftpLoggingOutputStream)
public void connect()
throws Exception
Exceptionpublic void disconnect()
public FTPClient getFTPClient()
public IHostFile getFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
getFile in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - fileName -
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.public boolean isConnected()
protected IHostFile[] internalFetch(IProgressMonitor monitor,
String parentPath,
String fileFilter,
int fileType)
throws SystemMessageException
internalFetch in class AbstractFileServiceSystemMessageException
public boolean upload(IProgressMonitor monitor,
File localFile,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding)
throws SystemMessageException
IFileService
upload in interface IFileServicemonitor - the monitor for this potentially long running operationlocalFile - - 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 binarysrcEncoding - - the src encoding of the file (if text)hostEncoding - - the tgt encoding of the file (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean upload(IProgressMonitor monitor,
InputStream stream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding)
throws SystemMessageException
IFileService
upload in interface IFileServicemonitor - the monitor for this potentially long running operationstream - input stream to transferremoteParent - - 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 binaryhostEncoding - - the tgt encoding of the file (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String hostEncoding)
throws SystemMessageException
IFileService
download in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - - a String designating the remote parent.remoteFile - - a String designating the remote file residing in the parent.localFile - - The file that is to be written. If the file exists it is
overwritten.isBinary - - indicates whether the file is text on binaryhostEncoding - - the encoding on the host (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.public IHostFile getUserHome()
getUserHome in interface IFileServicepublic IHostFile[] getRoots(IProgressMonitor monitor)
getRoots in interface IFileServicemonitor - the monitor for this potentially long running operation
Return the list of roots for this system
public boolean delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
IFileService
delete in interface IFileServicemonitor - the progress monitorremoteParent - the folder containing the file to deletefileName - the name of the file or folder to delete
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName)
throws SystemMessageException
IFileService
rename in interface IFileServicemonitor - the progress monitorremoteParent - the folder containing the file to renameoldName - the old name of the file or folder to renamenewName - the new name for the file
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName,
IHostFile oldFile)
IFileService
rename in interface IFileServicemonitor - the progress monitorremoteParent - the folder containing the file to renameoldName - the old name of the file or folder to renamenewName - the new name for the fileoldFile - the file to update with the change
public boolean move(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
throws SystemMessageException
IFileService
move in interface IFileServicemonitor - the progress monitorsrcParent - the folder containing the file or folder to movesrcName - the new of the file or folder to movetgtParent - the destination folder for the movetgtName - the name of the moved file or folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
throws SystemMessageException
IFileService
createFolder in interface IFileServicemonitor - the progress monitorremoteParent - the parent directoryfolderName - the name of the new folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
IFileService
createFile in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - the parent directoryfileName - the name of the new file
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean copy(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
throws SystemMessageException
IFileService
copy in interface IFileServicemonitor - the progress monitorsrcParent - the folder containing the file or folder to copysrcName - the new of the file or folder to copytgtParent - the destination folder for the copytgtName - the name of the copied file or folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean copyBatch(IProgressMonitor monitor,
String[] srcParents,
String[] srcNames,
String tgtParent)
throws SystemMessageException
IFileService
copyBatch in interface IFileServicemonitor - the progress monitorsrcParents - the folders containing each file or folder to copysrcNames - the names of the files or folders to copytgtParent - the destination folder for the copy
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.public void initService(IProgressMonitor monitor)
initService in interface IServicepublic void uninitService(IProgressMonitor monitor)
uninitService in interface IServicepublic boolean isCaseSensitive()
IFileService
isCaseSensitive in interface IFileService
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||