|
|||||||||
| 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.File
com.ssh.sft.Directory
A remote directory.
| Field Summary | |
static int |
SSH_SFT_SETSTAT_MODE_ADD
|
static int |
SSH_SFT_SETSTAT_MODE_OCTAL
|
static int |
SSH_SFT_SETSTAT_MODE_SUB
|
| Method Summary | |
File |
copy(Location dst)
Copies the directory and its contents recursively. |
File |
copy(Location dst,
Policies.CopyDir policy)
Copies the directory and its contents recursively using the specified policy. |
Directory |
copy(Location dst,
Policies.CopyDir policy,
ProgressFactory factory)
Copies the directory and its contents recursively using the specified policy and progresslistener factory. |
File |
getFile(String path)
Returns a File object representing the file at a named path. |
Location |
getLocation(String path)
|
File |
move(Location dst)
Moves the directory and its contents recursively. |
Directory |
move(Location dst,
Policies.MoveDir policy)
Moves the directory and its contents recursively using the specified policy. |
Directory |
move(Location dst,
Policies.MoveDir policy,
ProgressFactory factory)
Moves the directory and its contents recursively using the specified policy and progresslistener factory. |
DirHandle |
open()
Returns an iterator over this directory's entries. |
void |
remove()
Removes the directory and its contents recursively. |
void |
remove(Policies.RemoveDir policy)
Removes the directory and its contents recursively using the specified policy. |
void |
setstat(long permissions,
int mode,
Policies.Dir policy)
Sets the permissions of all files under this directory. |
void |
traverse(Policies.Dir policy)
Traverses the directory and its contents recursively. |
| Methods inherited from class com.ssh.sft.File |
copy, getAttributes, getGroup, getLocation, getOwner, getPath, getSession, getSize, getURI, rename, setAttributes |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SSH_SFT_SETSTAT_MODE_OCTAL
public static final int SSH_SFT_SETSTAT_MODE_ADD
public static final int SSH_SFT_SETSTAT_MODE_SUB
| Method Detail |
public Location getLocation(String path)
throws SftException
SftException
public File getFile(String path)
throws SftException
path - the path to the desired file relative to this directory
NoSuchFileException - if no file exists at the named path
SftException
public DirHandle open()
throws SftException
SftException
public File copy(Location dst)
throws SftException
File.copy(Location) and
copies this directory and its contents to the destination
location.
copy in class Filedst - the location to copy this directory to
SftException
public File copy(Location dst,
Policies.CopyDir policy)
throws SftException
dst - the location to copy this directory topolicy - the policy to use to decide which files to
copy, and to notify about errors
SftException
public Directory copy(Location dst,
Policies.CopyDir policy,
ProgressFactory factory)
throws SftException
dst - the location to copy this directory topolicy - the policy to use to decide which files to
copy, and to notify about errorsfactory - a progresslistener factory for tracking the progress
of individual file copyings
SftException
public File move(Location dst)
throws SftException
File.move(Location) and
copies this directory and its contents to the destination
location, after which the original directory and its contents
are removed. After the method returns, the directory
represented by this object is removed and no further
operations should be invoked on this object.
move in class Filedst - the location to move this directory to
SftException
public Directory move(Location dst,
Policies.MoveDir policy)
throws SftException
dst - the location to move this directory topolicy - the policy to use to decide which files to
copy and remove, and to notify about errors
SftException
public Directory move(Location dst,
Policies.MoveDir policy,
ProgressFactory factory)
throws SftException
dst - the location to move this directory topolicy - the policy to use to decide which files to
copy and remove, and to notify about errorsfactory - a progresslistener factory for tracking the progress
of individual file copyings
SftException
public void remove()
throws SftException
File.remove() and removes
all the contents of this directory before removing the
directory itself.
remove in class FileSftException - if removing either the directory or its contents fails
public void remove(Policies.RemoveDir policy)
throws SftException
SftException - if removing either the directory or its contents fails
public void traverse(Policies.Dir policy)
throws SftException
policy - the directory traversal policy to use
SftException
public void setstat(long permissions,
int mode,
Policies.Dir policy)
throws SftException
permissions - the permissions as a standard Unix bitfieldmode - the mode to use when applying the permissions.
Possible values are SshSftSetstatMode.SSH_SFT_SETSTAT_MODE_OCTAL for
setting the permissions verbatim, SshSftSetstatMode.SSH_SFT_SETSTAT_MODE_ADD for combining the new permissions
with the existing ones with a bitwise OR operation, and SshSftSetstatMode.SSH_SFT_SETSTAT_MODE_SUB for a bitwise AND NOT operation.policy - the directory traversal policy to use
SftException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||