public abstract class PassthroughBasedDirImpl extends AbstractDir
Modifier and Type | Field and Description |
---|---|
protected static PassthroughFileFactory |
factory
Factory for PassthroughFile
|
protected PassthroughFile |
pdir
Passthrough object
|
currentDir, ISUNIX, optsMLSx, roots, session
SEPARATOR, SEPARATORCHAR
Constructor and Description |
---|
PassthroughBasedDirImpl(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 |
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
|
protected File |
getFileFromPath(String path)
Get the File from this path, checking first its validity
|
long |
getFreeSpace() |
byte[] |
getMD5(String path)
Get the MD5 of the given FileInterface
|
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
|
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)
|
String |
mkdir(String directory)
Create the directory associated with the String as path
|
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, validatePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeDirectoryNotChecked, newFile
protected static PassthroughFileFactory factory
protected PassthroughFile pdir
public PassthroughBasedDirImpl(SessionInterface session, OptsMLSxInterface optsMLSx)
session
- optsMLSx
- protected List<String> wildcardFiles(String pathWithWildcard) throws CommandAbstractException
wildcardFiles
in class AbstractDir
pathWithWildcard
- The wildcard expression with a business path.CommandAbstractException
protected File getFileFromPath(String path) throws CommandAbstractException
path
- CommandAbstractException
protected File getTrueFile(String path) throws CommandAbstractException
path
- CommandAbstractException
protected String getRelativePath(File file)
file
- public boolean changeDirectory(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public String mkdir(String directory) throws CommandAbstractException
DirInterface
CommandAbstractException
public String rmdir(String directory) throws CommandAbstractException
DirInterface
CommandAbstractException
public boolean isDirectory(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public boolean isFile(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public String getModificationTime(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public List<String> list(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public List<String> listFull(String path, boolean lsFormat) throws CommandAbstractException
DirInterface
lsFormat
- True if ls Format, else MLSx formatCommandAbstractException
public String fileFull(String path, boolean lsFormat) throws CommandAbstractException
DirInterface
lsFormat
- True if ls Format, else MLSx formatCommandAbstractException
protected boolean isFullTime()
public long getFreeSpace() throws CommandAbstractException
CommandAbstractException
public FileInterface setUniqueFile() throws CommandAbstractException
DirInterface
CommandAbstractException
public boolean canRead() throws CommandAbstractException
CommandAbstractException
public boolean canWrite() throws CommandAbstractException
CommandAbstractException
public boolean exists() throws CommandAbstractException
CommandAbstractException
public long getCRC(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public byte[] getMD5(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
public byte[] getSHA1(String path) throws CommandAbstractException
DirInterface
CommandAbstractException
Copyright © 2009–2019 Waarp. All rights reserved.