|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.filetransfer.FileSource
A File Source is a generic representation of a file system and is used by the console for all file system communications. This class mimics java.io.File in use.
Field Summary | |
---|---|
protected static ServiceNode |
FSServiceNode
The ServiceNode used for all remote file source queries. |
Constructor Summary | |
---|---|
FileSource()
Default constructor for all file source objects. |
Method Summary | |
---|---|
abstract boolean |
canRead(FSTObject file)
Determines whether the specified filename can be read. |
abstract boolean |
canRead(java.lang.String filename)
Determines whether the specified filename can be read. |
abstract boolean |
canWrite(FSTObject file)
Determines whether the filename can be written to. |
abstract boolean |
canWrite(java.lang.String filename)
Determines whether the filename can be written to. |
abstract void |
cleanup()
Do all neccessary clean up here. |
abstract boolean |
deleteFile(FSTObject file)
Deletes the specified file. |
abstract boolean |
deleteFile(java.lang.String filename)
Deletes the specified file. |
abstract boolean |
exists(java.lang.String filename)
Determines if the specified filename exists on the File Source. |
abstract java.lang.String |
getDefaultEncoding()
Returns the default codepage to use for file streams. |
abstract boolean |
getDirectoryTree(FSTObject parent)
Returns an updated FSTObject for a directory. |
abstract java.lang.String |
getDriveDelimiter()
Get the default drive delimiter of this file source. |
abstract java.lang.String |
getEnvironmentVariable(java.lang.String varName)
Get an environment variable from the file source. |
abstract FileAttrs |
getFileAttributes(FSTObject file)
Get a FileAttrs object populated with the attributes of the specified file. |
abstract FileAttrs |
getFileAttributes(java.lang.String filename)
Get a FileAttrs object populated with the attributes of the specified file. |
abstract long |
getFileSize(FSTObject file)
Retrieves the file size of the specified file. |
abstract long |
getFileSize(java.lang.String filename)
Retrieves the file size of the specified file. |
abstract int |
getFileSourceState()
Get the state of filesource initialization. |
static float |
getFiletransferVersion(java.util.Locale loc,
MultiLocaleBundle ourBundle)
Returns the version of file transfer on the current server. |
abstract java.lang.String |
getHostname()
Get the hostname. |
abstract java.io.InputStream |
getInputStream(FSTObject file)
Returns an InputStream for the specified file. |
abstract java.io.InputStream |
getInputStream(java.lang.String filename)
Returns an InputStream for the specified file. |
abstract java.lang.String |
getNameDelimiter()
Get the default name delimiter of this file source. |
abstract java.io.OutputStream |
getOutputStream(FSTObject file)
Returns an OutputStream for the specified file. |
abstract java.io.OutputStream |
getOutputStream(java.lang.String filename)
Returns an OutputStream for the specified file. |
abstract java.lang.String |
getPathDelimiter()
Get the default path delimiter of this file source. |
abstract byte[] |
getRegBytesValue(java.lang.String keyName,
java.lang.String valueName)
Get a registry value of type byte[] from the file source. |
abstract int |
getRegIntValue(java.lang.String keyName,
java.lang.String valueName)
Get a registry value of type int from the file source. |
abstract java.lang.String |
getRegStringValue(java.lang.String keyName,
java.lang.String valueName)
Get a registry value of type String from the file source. |
abstract java.lang.String |
getRootDelimiter()
Get the default root delimiter of this file source. |
abstract FSTObject[] |
getRootLevel()
Get the root level of the file source (e.g. |
abstract java.lang.String |
getSearchString()
Get the default search string of this file source. |
static boolean |
hasServerFSAccess()
Does the current user have access to the server? |
abstract boolean |
isAbsolute(java.lang.String filename)
Determines whether the filename is an absolute path. |
abstract boolean |
isDirectory(java.lang.String filename)
Determines if the specified filename exists, and is a DIRECTORY, rather than a FILE. |
abstract boolean |
isFile(java.lang.String filename)
Determines if the specified filename exists, and is a FILE, rather than a DIRECTORY. |
abstract boolean |
mkdir(FSTObject directory)
Creates the specified directory. |
abstract boolean |
mkdir(java.lang.String directoryName)
Creates the specified directory. |
abstract boolean |
mkdir(java.lang.String directoryName,
FileAttrs attrs)
Creates the specified directory. |
abstract void |
refresh()
Refreshes the file source drive list. |
protected static void |
removeFSServiceNodeUse()
This method should be called from cleanup. |
abstract boolean |
renameFile(FSTObject file,
java.lang.String newFilename)
Renames the specified file to newFilename. |
abstract boolean |
renameFile(java.lang.String originalFilename,
java.lang.String newFilename)
Renames the specified file to newFilename. |
abstract void |
setHostname(java.lang.String host)
Set the hostname. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static ServiceNode FSServiceNode
Constructor Detail |
public FileSource() throws FTException
Method Detail |
protected static void removeFSServiceNodeUse() throws FTException
FTException
public static boolean hasServerFSAccess()
public static float getFiletransferVersion(java.util.Locale loc, MultiLocaleBundle ourBundle)
public abstract void setHostname(java.lang.String host)
public abstract java.lang.String getHostname()
public abstract int getFileSourceState()
public abstract void refresh() throws FTException
FTException
public abstract boolean getDirectoryTree(FSTObject parent) throws FTException
parent
- the node to get file system info for
FTException
public abstract FSTObject[] getRootLevel() throws FTException
FTException
public abstract boolean exists(java.lang.String filename) throws FTException
FTException
public abstract boolean isFile(java.lang.String filename) throws FTException
FTException
public abstract boolean isDirectory(java.lang.String filename) throws FTException
FTException
public abstract boolean isAbsolute(java.lang.String filename)
public abstract boolean canWrite(java.lang.String filename) throws FTException
FTException
public abstract boolean canWrite(FSTObject file) throws FTException
FTException
public abstract boolean canRead(java.lang.String filename) throws FTException
FTException
public abstract boolean canRead(FSTObject file) throws FTException
FTException
public abstract boolean deleteFile(java.lang.String filename) throws FTException
FTException
public abstract boolean deleteFile(FSTObject file) throws FTException
FTException
public abstract long getFileSize(java.lang.String filename) throws FTException
FTException
public abstract long getFileSize(FSTObject file) throws FTException
FTException
public abstract boolean mkdir(java.lang.String directoryName) throws FTException
FTException
public abstract boolean mkdir(java.lang.String directoryName, FileAttrs attrs) throws FTException
FTException
public abstract boolean mkdir(FSTObject directory) throws FTException
FTException
public abstract boolean renameFile(java.lang.String originalFilename, java.lang.String newFilename) throws FTException
FTException
public abstract boolean renameFile(FSTObject file, java.lang.String newFilename) throws FTException
FTException
public abstract java.io.InputStream getInputStream(java.lang.String filename) throws FTException
FTException
public abstract java.io.InputStream getInputStream(FSTObject file) throws FTException
FTException
public abstract java.io.OutputStream getOutputStream(java.lang.String filename) throws FTException
FTException
public abstract java.io.OutputStream getOutputStream(FSTObject file) throws FTException
FTException
public abstract java.lang.String getRegStringValue(java.lang.String keyName, java.lang.String valueName) throws FTException
FTException
public abstract byte[] getRegBytesValue(java.lang.String keyName, java.lang.String valueName) throws FTException
FTException
public abstract int getRegIntValue(java.lang.String keyName, java.lang.String valueName) throws FTException
FTException
public abstract java.lang.String getEnvironmentVariable(java.lang.String varName) throws FTException
FTException
public abstract FileAttrs getFileAttributes(java.lang.String filename) throws FTException
FTException
public abstract FileAttrs getFileAttributes(FSTObject file) throws FTException
FTException
public abstract java.lang.String getDriveDelimiter()
public abstract java.lang.String getPathDelimiter()
public abstract java.lang.String getNameDelimiter()
public abstract java.lang.String getRootDelimiter()
public abstract java.lang.String getSearchString()
public abstract java.lang.String getDefaultEncoding()
public abstract void cleanup() throws FTException
FTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |