|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.filetransfer.FileSource
com.tivoli.twg.filetransfer.FSConsole
Console or Local implementation of FileSource. This is a generic wrapper for local file accesses.
Field Summary |
---|
Fields inherited from class com.tivoli.twg.filetransfer.FileSource |
---|
FSServiceNode |
Constructor Summary | |
---|---|
FSConsole()
Default Constructor. |
Method Summary | |
---|---|
boolean |
canRead(FSTObject file)
Determines whether the specified filename can be read. |
boolean |
canRead(java.lang.String filename)
Determines whether the specified filename can be read. |
boolean |
canWrite(FSTObject file)
Determines whether the filename can be written to. |
boolean |
canWrite(java.lang.String filename)
Determines whether the filename can be written to. |
void |
cleanup()
Do all neccessary clean up here. |
boolean |
deleteFile(FSTObject file)
Deletes the specified file. |
boolean |
deleteFile(java.lang.String filename)
Deletes the specified file. |
boolean |
exists(java.lang.String filename)
Determines if the specified filename exists on the File Source. |
java.lang.String |
getDefaultEncoding()
Returns the default codepage to use for file streams. |
boolean |
getDirectoryTree(FSTObject parent)
Returns an updated FSTObject for a directory. |
java.lang.String |
getDriveDelimiter()
Get the default drive delimiter of this file source. |
java.lang.String |
getEnvironmentVariable(java.lang.String varName)
Get an environment variable from the file source. |
FileAttrs |
getFileAttributes(FSTObject file)
Get a FileAttrs object populated with the attributes of the specified file. |
FileAttrs |
getFileAttributes(java.lang.String filename)
Get a FileAttrs object populated with the attributes of the specified file. |
long |
getFileSize(FSTObject file)
Retrieves the file size of the specified file. |
long |
getFileSize(java.lang.String filename)
Retrieves the file size of the specified file. |
int |
getFileSourceState()
Get the state of filesource initialization. |
java.lang.String |
getHostname()
Get the hostname. |
java.io.InputStream |
getInputStream(FSTObject file)
Returns an InputStream for the specified file. |
java.io.InputStream |
getInputStream(java.lang.String filename)
Returns an InputStream for the specified file. |
java.lang.String |
getNameDelimiter()
Get the default name delimiter of this file source. |
java.io.OutputStream |
getOutputStream(FSTObject file)
Returns an OutputStream for the specified file. |
java.io.OutputStream |
getOutputStream(java.lang.String filename)
Returns an OutputStream for the specified file. |
java.lang.String |
getPathDelimiter()
Get the default path delimiter of this file source. |
byte[] |
getRegBytesValue(java.lang.String keyName,
java.lang.String valueName)
Get a registry value of type byte[] from the file source. |
int |
getRegIntValue(java.lang.String keyName,
java.lang.String valueName)
Get a registry value of type int from the file source. |
java.lang.String |
getRegStringValue(java.lang.String keyName,
java.lang.String valueName)
Get a registry value of type String from the file source. |
java.lang.String |
getRootDelimiter()
Get the default root delimiter of this file source. |
FSTObject[] |
getRootLevel()
Get the root level of the file source (e.g. |
java.lang.String |
getSearchString()
Get the default search string of this file source. |
boolean |
isAbsolute(java.lang.String filename)
Determines whether the filename is an absolute path. |
boolean |
isDirectory(java.lang.String filename)
Determines if the specified filename exists, and is a DIRECTORY, rather than a FILE. |
boolean |
isFile(java.lang.String filename)
Determines if the specified filename exists, and is a FILE, rather than a DIRECTORY. |
boolean |
mkdir(FSTObject directory)
Creates the specified directory. |
boolean |
mkdir(java.lang.String directoryName)
Creates the specified directory. |
boolean |
mkdir(java.lang.String directoryName,
FileAttrs attrs)
Creates the specified directory. |
void |
refresh()
Refreshes the file source drive list. |
boolean |
renameFile(FSTObject file,
java.lang.String newFilename)
Renames the specified file to newFilename. |
boolean |
renameFile(java.lang.String originalFilename,
java.lang.String newFilename)
Renames the specified file to newFilename. |
boolean |
rmdir(FSTObject directory)
Delete the specified directory. |
boolean |
rmdir(java.lang.String directoryName)
Delete the specified directory. |
static boolean |
setFileAttributes(java.lang.String filename,
FileAttrs attributes)
Set attributes on the local file source. |
static boolean |
setFileAttributes(java.lang.String filename,
FileAttrs attributes,
boolean setDate)
Set attributes on the local file source. |
void |
setHostname(java.lang.String host)
Set the hostname. |
Methods inherited from class com.tivoli.twg.filetransfer.FileSource |
---|
getFiletransferVersion, hasServerFSAccess, removeFSServiceNodeUse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FSConsole() throws FTException
Method Detail |
public void setHostname(java.lang.String host)
setHostname
in class FileSource
public java.lang.String getHostname()
getHostname
in class FileSource
public int getFileSourceState()
getFileSourceState
in class FileSource
public void refresh() throws FTException
refresh
in class FileSource
FTException
public boolean getDirectoryTree(FSTObject parent) throws FTException
getDirectoryTree
in class FileSource
parent
- the node to get file system info for
FTException
public FSTObject[] getRootLevel() throws FTException
getRootLevel
in class FileSource
FTException
public boolean exists(java.lang.String filename) throws FTException
exists
in class FileSource
FTException
public boolean isFile(java.lang.String filename) throws FTException
isFile
in class FileSource
FTException
public boolean isDirectory(java.lang.String filename) throws FTException
isDirectory
in class FileSource
FTException
public boolean isAbsolute(java.lang.String filename)
isAbsolute
in class FileSource
public boolean canWrite(java.lang.String filename) throws FTException
canWrite
in class FileSource
FTException
public boolean canWrite(FSTObject file) throws FTException
canWrite
in class FileSource
FTException
public boolean canRead(java.lang.String filename) throws FTException
canRead
in class FileSource
FTException
public boolean canRead(FSTObject file) throws FTException
canRead
in class FileSource
FTException
public boolean deleteFile(java.lang.String filename) throws FTException
deleteFile
in class FileSource
FTException
public boolean deleteFile(FSTObject file) throws FTException
deleteFile
in class FileSource
FTException
public long getFileSize(java.lang.String filename) throws FTException
getFileSize
in class FileSource
FTException
public long getFileSize(FSTObject file) throws FTException
getFileSize
in class FileSource
FTException
public boolean mkdir(java.lang.String directoryName) throws FTException
mkdir
in class FileSource
FTException
public boolean mkdir(java.lang.String directoryName, FileAttrs attrs) throws FTException
mkdir
in class FileSource
FTException
public boolean mkdir(FSTObject directory) throws FTException
mkdir
in class FileSource
FTException
public boolean renameFile(java.lang.String originalFilename, java.lang.String newFilename) throws FTException
renameFile
in class FileSource
FTException
public boolean renameFile(FSTObject file, java.lang.String newFilename) throws FTException
renameFile
in class FileSource
FTException
public java.io.InputStream getInputStream(java.lang.String filename) throws FTException
getInputStream
in class FileSource
FTException
public java.io.InputStream getInputStream(FSTObject file) throws FTException
getInputStream
in class FileSource
FTException
public java.io.OutputStream getOutputStream(java.lang.String filename) throws FTException
getOutputStream
in class FileSource
FTException
public java.io.OutputStream getOutputStream(FSTObject file) throws FTException
getOutputStream
in class FileSource
FTException
public FileAttrs getFileAttributes(java.lang.String filename) throws FTException
getFileAttributes
in class FileSource
FTException
public FileAttrs getFileAttributes(FSTObject file) throws FTException
getFileAttributes
in class FileSource
FTException
public java.lang.String getDriveDelimiter()
getDriveDelimiter
in class FileSource
public java.lang.String getPathDelimiter()
getPathDelimiter
in class FileSource
public java.lang.String getNameDelimiter()
getNameDelimiter
in class FileSource
public java.lang.String getRootDelimiter()
getRootDelimiter
in class FileSource
public java.lang.String getSearchString()
getSearchString
in class FileSource
public java.lang.String getDefaultEncoding()
getDefaultEncoding
in class FileSource
public void cleanup() throws FTException
cleanup
in class FileSource
FTException
public java.lang.String getRegStringValue(java.lang.String keyName, java.lang.String valueName) throws FTException
getRegStringValue
in class FileSource
FTException
public byte[] getRegBytesValue(java.lang.String keyName, java.lang.String valueName) throws FTException
getRegBytesValue
in class FileSource
FTException
public int getRegIntValue(java.lang.String keyName, java.lang.String valueName) throws FTException
getRegIntValue
in class FileSource
FTException
public java.lang.String getEnvironmentVariable(java.lang.String varName) throws FTException
getEnvironmentVariable
in class FileSource
FTException
public boolean rmdir(java.lang.String directoryName) throws FTException
FTException
public boolean rmdir(FSTObject directory) throws FTException
FTException
public static boolean setFileAttributes(java.lang.String filename, FileAttrs attributes)
public static boolean setFileAttributes(java.lang.String filename, FileAttrs attributes, boolean setDate)
setDate
- - if true, set the date, otherwise ignore the date and
only set the attributes.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |