|
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.local.files.LocalFileService
| Nested Class Summary | |
|---|---|
class |
LocalFileService.LocalFileNameFilter
|
| Field Summary | |
|---|---|
protected ISystemFileTypes |
_fileTypeRegistry
|
| Fields inherited from class org.eclipse.rse.services.files.AbstractFileService |
|---|
FILE_TYPE_FILES, FILE_TYPE_FILES_AND_FOLDERS, FILE_TYPE_FOLDERS |
| Constructor Summary | |
|---|---|
LocalFileService(ISystemFileTypes fileTypeRegistry)
|
|
| Method Summary | |
|---|---|
protected IHostFile[] |
convertToHostFiles(File[] files,
int type)
|
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 |
boolean |
copyFromArchive(File sourceFolderOrFile,
File targetFolder,
String newName,
IProgressMonitor monitor,
String sourceEncoding,
String targetEncoding,
boolean isText)
Copy a file or folder to a new target parent folder, but if copying from an archive, extract the file in the encoding specified |
IHostFile |
createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
Create a file on the host |
protected LocalVirtualHostFile |
createFileInArchive(File newFile)
|
IHostFile |
createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
Create a folder on the host |
protected LocalVirtualHostFile |
createFolderInArchive(File newFolder)
|
boolean |
delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
Deletes a file or folder on the host |
protected boolean |
deleteArchive(File file)
|
protected boolean |
deleteFromArchive(File destination)
Deletes a virtual file from its archive. |
boolean |
download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File destinationFile,
boolean isBinary,
String hostEncoding)
Copy a file from the remote file system to the local system. |
protected File |
getContainingArchive(File file)
|
String |
getDescription()
|
IHostFile |
getFile(IProgressMonitor monitor,
String remoteParent,
String name)
|
String |
getName()
|
IHostFile[] |
getRoots(IProgressMonitor monitor)
|
IHostFile |
getUserHome()
|
protected String |
getVirtualPart(String absPath)
|
protected void |
handleSpecialChars(StringBuffer buf)
|
void |
initService(IProgressMonitor monitor)
|
protected IHostFile[] |
internalFetch(IProgressMonitor monitor,
String remoteParent,
String fileFilter,
int type)
|
boolean |
isCaseSensitive()
Indicates whether the file system is case sensitive |
protected boolean |
isSpecialChar(char c)
Checks whether the given character is a special character in the shell. |
boolean |
isWindows()
|
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 |
protected boolean |
renameVirtualFile(File destination,
String newName)
Renames a virtual file |
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 |
| Field Detail |
protected ISystemFileTypes _fileTypeRegistry
| Constructor Detail |
public LocalFileService(ISystemFileTypes fileTypeRegistry)
| Method Detail |
public String getName()
getName in interface IServicepublic String getDescription()
getDescription in interface IServicepublic boolean isWindows()
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 destinationFile,
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.destinationFile - - 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 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.
protected IHostFile[] internalFetch(IProgressMonitor monitor,
String remoteParent,
String fileFilter,
int type)
internalFetch in class AbstractFileService
protected IHostFile[] convertToHostFiles(File[] files,
int type)
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 IHostFile getFile(IProgressMonitor monitor,
String remoteParent,
String name)
getFile in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - name -
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.
protected LocalVirtualHostFile createFileInArchive(File newFile)
throws SystemMessageException
SystemMessageExceptionprotected File getContainingArchive(File file)
protected String getVirtualPart(String absPath)
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.
protected LocalVirtualHostFile createFolderInArchive(File newFolder)
throws SystemMessageException
SystemMessageException
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.
protected boolean deleteFromArchive(File destination)
throws SystemMessageException
destination - virtual file to delete from archive
SystemMessageExceptionprotected boolean deleteArchive(File file)
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)
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 fileoldFile - the file to update with the change
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
protected boolean renameVirtualFile(File destination,
String newName)
throws SystemMessageException
destination - virtual file to renamenewName - the new name of the virtual file
SystemMessageException
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 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.protected void handleSpecialChars(StringBuffer buf)
protected boolean isSpecialChar(char c)
c - the character to check.
true if the character is a special character, false otherwise.
public boolean copyFromArchive(File sourceFolderOrFile,
File targetFolder,
String newName,
IProgressMonitor monitor,
String sourceEncoding,
String targetEncoding,
boolean isText)
throws SystemMessageException
sourceFolderOrFile - The file or folder to copytargetFolder - The folder to copy to. No guarantee it is on the same system, so be sure to check getSystemConnection()!newName - The new name for the copied file or folder
SystemMessageExceptionpublic void initService(IProgressMonitor monitor)
initService in interface IServicepublic void uninitService(IProgressMonitor monitor)
uninitService in interface IServicepublic boolean isCaseSensitive()
IFileService
isCaseSensitive in interface IFileService
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.
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||