|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ssh.sft.SftLib
com.ssh.sft.SftBase
com.ssh.sft.Location
A location for a remote file. Instances of this class represent
remote file locations which may be occupied by files. A location
has two components: a Session that determines a host, and
a path within that host.
Operations on file locations are not reliable if the relevant
parts of the file system are concurrently being modified by
external processes.
| Field Summary |
| Fields inherited from interface com.ssh.sft.SftLibConstants |
SSH_SFT_DIR_RECURSIVE, SSH_SFT_HASH_MAX_BLOCK_SIZE, SSH_SFT_HASH_MAX_ITERATIONS, SSH_SFT_HASH_MIN_BLOCK_SIZE, SSH_SFT_REQUEST_MAX_NUM, SSH_SFT_REQUEST_MAX_SIZE |
| Method Summary | |
Directory |
createDirectory(FileAttributes attrs)
Creates a new directory at this location. |
RegularFile |
createFile()
Creates a new file at this location, initially empty. |
SymLink |
createSymLink(Location target)
Creates a new symbolic link at this location. |
Location |
getCanonicalPath()
|
File |
getFile()
Returns a representation of the file at this location. |
String |
getPath()
Returns the path that this location's session uses to access this location. |
Session |
getSession()
Returns the session that is used to access this location. |
URI |
getURI()
|
Location |
resolve(String relPath)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public File getFile()
throws NoSuchFileException,
SftException
NoSuchFileException - if no file is found at this location
SftExceptionpublic String getPath()
public Location resolve(String relPath)
public Location getCanonicalPath()
public Directory createDirectory(FileAttributes attrs)
throws PermissionDeniedException,
NoSuchFileException,
SftException
attrs - the attributes to assign to the new directory
NoSuchFileException - if the parent directory of this location does not exist
PermissionDeniedException - if the client does not have the rights to create a new directory
SftException
public SymLink createSymLink(Location target)
throws SftException
target - the location to link to
SftException
public RegularFile createFile()
throws SftException
SftExceptionpublic Session getSession()
public URI getURI()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||