public class DirectoryOperation extends Object
This class provides a list of operations that have been/or will be completed by the SftpClient's copyRemoteDirectory/copyLocalDirectory methods.
The objects returned could either be SftpFile
or
java.io.File depending upon the commit state and whether
syncronization is required. Any code using the values returned should be able
to handle both types of file object.
Constructor and Description |
---|
DirectoryOperation()
Construct a new directory operation object
|
Modifier and Type | Method and Description |
---|---|
void |
addDirectoryOperation(DirectoryOperation op,
File f)
Add the contents of another directory operation.
|
void |
addDirectoryOperation(DirectoryOperation op,
String file)
Add the contents of another directory operation.
|
boolean |
containsFile(File f)
Determine whether the operation contains a file.
|
boolean |
containsFile(SftpFile f)
Determine whether the directory operation contains an SftpFile
|
Vector |
getDeletedFiles()
When synchronizing directories, this method will return a list of files
that will be deleted becasue they no longer exist at the source location.
|
Hashtable |
getFailedTransfers()
Returns a Hashtable of files and exceptions.
|
int |
getFileCount()
Get the total number of new and changed files to transfer
|
Vector |
getNewFiles()
Returns a list of new files that will be transfered in the directory
operation
|
long |
getTransferSize()
Get the total number of bytes that this operation will transfer
|
Vector |
getUnchangedFiles()
Returns the list of files that will not be changed during the directory
operation
|
Vector |
getUpdatedFiles()
Returns a list of files that will be updated in the directory operation
|
public DirectoryOperation()
public Vector getNewFiles()
public Vector getUpdatedFiles()
public Vector getUnchangedFiles()
public Vector getDeletedFiles()
public Hashtable getFailedTransfers()
public boolean containsFile(File f)
f
- public boolean containsFile(SftpFile f)
f
- public void addDirectoryOperation(DirectoryOperation op, File f)
op
- f
- public int getFileCount()
public void addDirectoryOperation(DirectoryOperation op, String file)
op
- file
- public long getTransferSize() throws SftpStatusException, SshException
SftpStatusException
SshException
Copyright © 2024. All rights reserved.