com.ssh.sft
Class File
java.lang.Object
com.ssh.sft.SftLib
com.ssh.sft.SftBase
com.ssh.sft.File
- All Implemented Interfaces:
- SftLibConstants, com.ssh.sft.SshSftFileType
- Direct Known Subclasses:
- Directory, RegularFile, SymLink
- public abstract class File
- extends com.ssh.sft.SftBase
- implements com.ssh.sft.SshSftFileType
A remote file. An instance of this class represents a particular
file at a particular location at a particular time. An instance
will no longer be valid once the file or its parent directories
are moved or deleted.
This class is abstract, and contains only the operations
applicable to all files.
SSH_SFT_FILE_TYPE_REGULAR
public static final int SSH_SFT_FILE_TYPE_REGULAR
- See Also:
- Constant Field Values
SSH_SFT_FILE_TYPE_DIRECTORY
public static final int SSH_SFT_FILE_TYPE_DIRECTORY
- See Also:
- Constant Field Values
SSH_SFT_FILE_TYPE_SYMLINK
public static final int SSH_SFT_FILE_TYPE_SYMLINK
- See Also:
- Constant Field Values
SSH_SFT_FILE_TYPE_SPECIAL
public static final int SSH_SFT_FILE_TYPE_SPECIAL
- See Also:
- Constant Field Values
SSH_SFT_FILE_TYPE_UNKNOWN
public static final int SSH_SFT_FILE_TYPE_UNKNOWN
- See Also:
- Constant Field Values
getAttributes
public FileAttributes getAttributes()
throws SftException
- Throws:
SftException
setAttributes
public void setAttributes(FileAttributes attrs)
throws SftException
- Throws:
SftException
getPath
public String getPath()
getLocation
public Location getLocation()
- Returns the location of this file.
- Returns:
- the location of this file
getOwner
public String getOwner()
throws SftException
- Throws:
SftException
getGroup
public String getGroup()
throws SftException
- Throws:
SftException
remove
public void remove()
throws SftException
- Throws:
SftException
copy
public File copy(Location dst)
throws SftException
- Throws:
SftException
copy
public File copy(Location dst,
ProgressListener progress)
throws SftException
- Throws:
SftException
move
public File move(Location dst)
throws SftException
- Throws:
SftException
rename
public File rename(Location dst)
throws SftException
- Throws:
SftException
getURI
public URI getURI()
getSession
public Session getSession()
getSize
public long getSize()
throws SftException
- Throws:
SftException