
public abstract class FilesystemBasedDirImpl extends AbstractDir
| Modifier and Type | Field and Description |
|---|---|
protected static FilesystemBasedDirJdkAbstract |
filesystemBasedFtpDirJdk
Class that handles specifity of one Jdk or another
|
currentDir, ISUNIX, optsMLSx, roots, sessionSEPARATOR, SEPARATORCHAR| Modifier | Constructor and Description |
|---|---|
protected |
FilesystemBasedDirImpl(SessionInterface session,
OptsMLSxInterface optsMLSx) |
| 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 |
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
|
protected File |
getFileFromPath(String path)
Get the FileInterface from this path, checking first its validity
|
long |
getFreeSpace() |
byte[] |
getMD5(String path)
Get the MD5 of the given FileInterface
|
protected String |
getModificationTime(File file)
Return the Modification time for the File
|
String |
getModificationTime(String path)
Return the Modification time for the path
|
protected String |
getRelativePath(File file)
Get the relative path (without mount point)
|
byte[] |
getSHA1(String path)
Get the SHA-1 of the given FileInterface
|
protected File |
getTrueFile(String path)
Get the true file from the path
|
static void |
initJdkDependent(FilesystemBasedDirJdkAbstract filesystemBasedFtpDirJdkChoice)
Deprecated.
replaced by initJdkDependent()
|
boolean |
isDirectory(String path)
Is the given path a directory and exists
|
boolean |
isFile(String path)
Is the given path a file and exists
|
protected boolean |
isFullTime()
Decide if Full time or partial time as in 'ls' command
|
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)
|
protected String |
lsInfo(File file) |
String |
mkdir(String directory)
Create the directory associated with the String as path
|
protected String |
mlsxInfo(File file) |
String |
rmdir(String directory)
Delete the directory associated with the String as path
|
FileInterface |
setUniqueFile()
Set a new unique path as the current FileInterface from the current
Directory (STOU)
|
protected List<String> |
wildcardFiles(String pathWithWildcard)
Finds all files matching a wildcard expression (based on '?'
|
changeParentDirectory, checkIdentify, clear, consolidatePath, getCanonicalPath, getCorrespondingRoot, getOptsMLSx, getPwd, getSession, initAfterIdentification, isAbsolute, isPathInCurrentDir, isPathInCurrentDir, normalizePath, pathFromURI, setFile, validatePath, validatePathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewFileprotected static FilesystemBasedDirJdkAbstract filesystemBasedFtpDirJdk
protected FilesystemBasedDirImpl(SessionInterface session, OptsMLSxInterface optsMLSx)
session - optsMLSx - @Deprecated public static void initJdkDependent(FilesystemBasedDirJdkAbstract filesystemBasedFtpDirJdkChoice)
filesystemBasedFtpDirJdkChoice - protected List<String> wildcardFiles(String pathWithWildcard) throws CommandAbstractException
wildcardFiles in class AbstractDirpathWithWildcard - The wildcard expression with a business
path.CommandAbstractExceptionprotected File getFileFromPath(String path) throws CommandAbstractException
path - CommandAbstractExceptionprotected File getTrueFile(String path) throws CommandAbstractException
path - CommandAbstractExceptionprotected String getRelativePath(File file)
file - public boolean changeDirectory(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic boolean changeDirectoryNotChecked(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic String mkdir(String directory) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic String rmdir(String directory) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic boolean isDirectory(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic boolean isFile(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic String getModificationTime(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionprotected String getModificationTime(File file)
file - public List<String> list(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic List<String> listFull(String path, boolean lsFormat) throws CommandAbstractException
DirInterfacelsFormat - True if ls Format, else MLSx formatCommandAbstractExceptionpublic String fileFull(String path, boolean lsFormat) throws CommandAbstractException
DirInterfacelsFormat - True if ls Format, else MLSx formatCommandAbstractExceptionprotected boolean isFullTime()
protected String mlsxInfo(File file)
file - public long getFreeSpace()
throws CommandAbstractException
CommandAbstractExceptionpublic FileInterface setUniqueFile() throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic boolean canRead()
throws CommandAbstractException
CommandAbstractExceptionpublic boolean canWrite()
throws CommandAbstractException
CommandAbstractExceptionpublic boolean exists()
throws CommandAbstractException
CommandAbstractExceptionpublic long getCRC(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic byte[] getMD5(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic byte[] getSHA1(String path) throws CommandAbstractException
DirInterfaceCommandAbstractExceptionpublic byte[] getDigest(String path, String algo) throws CommandAbstractException
DirInterfacealgo - algorithm of Digest among CRC32, ADLER32, MD5, MD2,
SHA-1, SHA-256, SHA-384, SHA-512CommandAbstractExceptionCopyright © 2009–2020 Waarp. All rights reserved.