public interface DirInterface
Modifier and Type | Field and Description |
---|---|
static String |
SEPARATOR
FileInterface separator for external
|
static char |
SEPARATORCHAR
FileInterface separator for external
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRead() |
boolean |
canWrite() |
boolean |
changeDirectory(String path)
Change directory with the one given as argument
|
boolean |
changeDirectoryNotChecked(String path)
Change directory with the one given as argument without checking
existence
|
boolean |
changeParentDirectory()
Change for parent directory
|
void |
checkIdentify()
Check if the authentication is correct
|
void |
clear()
Set empty this FtpDir, mark it unReady.
|
boolean |
exists() |
String |
fileFull(String path,
boolean lsFormat)
Give for 1 file all informations from the given path (could be a file or
a
directory)
|
long |
getCRC(String path)
Get the CRC of the given FileInterface
|
byte[] |
getDigest(String path,
String algo)
Get the Digest of the given FileInterface
|
long |
getFreeSpace() |
byte[] |
getMD5(String path)
Get the MD5 of the given FileInterface
|
String |
getModificationTime(String path)
Return the Modification time for the path
|
OptsMLSxInterface |
getOptsMLSx() |
String |
getPwd() |
SessionInterface |
getSession() |
byte[] |
getSHA1(String path)
Get the SHA-1 of the given FileInterface
|
void |
initAfterIdentification()
Init DirInterface after authentication is done
|
boolean |
isDirectory(String path)
Is the given path a directory and exists
|
boolean |
isFile(String path)
Is the given path a file and exists
|
boolean |
isPathInCurrentDir(String path)
Check if the given path is valid in the sens starting from the current
directory
|
List<String> |
list(String path)
List all files from the given path (could be a file or a directory)
|
List<String> |
listFull(String path,
boolean lsFormat)
List all files with other informations from the given path (could be a
file
or a directory)
|
String |
mkdir(String directory)
Create the directory associated with the String as path
|
FileInterface |
newFile(String path,
boolean append)
Create a new File
|
String |
rmdir(String directory)
Delete the directory associated with the String as path
|
FileInterface |
setFile(String path,
boolean append)
Set a path as the current FileInterface
|
FileInterface |
setUniqueFile()
Set a new unique path as the current FileInterface from the current
Directory (STOU)
|
String |
validatePath(String path)
Construct and Check if the given path is valid from business point of
view
(see
AuthInterface ) |
static final String SEPARATOR
static final char SEPARATORCHAR
OptsMLSxInterface getOptsMLSx()
void clear()
void initAfterIdentification()
void checkIdentify() throws Reply530Exception
Reply530Exception
SessionInterface getSession()
String validatePath(String path) throws CommandAbstractException
AuthInterface
)path
- CommandAbstractException
boolean isPathInCurrentDir(String path)
path
- String getPwd() throws CommandAbstractException
CommandAbstractException
boolean changeDirectory(String path) throws CommandAbstractException
path
- CommandAbstractException
boolean changeDirectoryNotChecked(String path) throws CommandAbstractException
path
- CommandAbstractException
boolean changeParentDirectory() throws CommandAbstractException
CommandAbstractException
String mkdir(String directory) throws CommandAbstractException
directory
- CommandAbstractException
String rmdir(String directory) throws CommandAbstractException
directory
- CommandAbstractException
boolean isDirectory(String path) throws CommandAbstractException
path
- CommandAbstractException
boolean isFile(String path) throws CommandAbstractException
path
- CommandAbstractException
String getModificationTime(String path) throws CommandAbstractException
path
- CommandAbstractException
List<String> list(String path) throws CommandAbstractException
path
- CommandAbstractException
List<String> listFull(String path, boolean lsFormat) throws CommandAbstractException
path
- lsFormat
- True if ls Format, else MLSx formatCommandAbstractException
String fileFull(String path, boolean lsFormat) throws CommandAbstractException
path
- lsFormat
- True if ls Format, else MLSx formatCommandAbstractException
long getFreeSpace() throws CommandAbstractException
CommandAbstractException
FileInterface newFile(String path, boolean append) throws CommandAbstractException
path
- append
- CommandAbstractException
FileInterface setFile(String path, boolean append) throws CommandAbstractException
path
- append
- True if this file is supposed to be in append mode
(APPE), False in any other casesCommandAbstractException
FileInterface setUniqueFile() throws CommandAbstractException
CommandAbstractException
boolean canRead() throws CommandAbstractException
CommandAbstractException
boolean canWrite() throws CommandAbstractException
CommandAbstractException
boolean exists() throws CommandAbstractException
CommandAbstractException
long getCRC(String path) throws CommandAbstractException
path
- CommandAbstractException
byte[] getMD5(String path) throws CommandAbstractException
path
- CommandAbstractException
byte[] getSHA1(String path) throws CommandAbstractException
path
- CommandAbstractException
byte[] getDigest(String path, String algo) throws CommandAbstractException
path
- algo
- algorithm of Digest among CRC32, ADLER32, MD5, MD2,
SHA-1, SHA-256, SHA-384, SHA-512CommandAbstractException
Copyright © 2009–2020 Waarp. All rights reserved.