
public abstract class AbstractDir extends Object implements DirInterface
| Modifier and Type | Field and Description |
|---|---|
protected String |
currentDir
Current Directory
|
protected static Boolean |
ISUNIX
Hack to say Windows or Unix (root like X:\ or /)
|
protected OptsMLSxInterface |
optsMLSx
Opts command for MLSx. (-1) means not supported, 0 supported but not
active, 1 supported and active
|
protected static File[] |
roots
Roots for Windows system
|
protected SessionInterface |
session
SessionInterface
|
SEPARATOR, SEPARATORCHAR| Constructor and Description |
|---|
AbstractDir() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeParentDirectory()
Change for parent directory
|
void |
checkIdentify()
Check if the authentication is correct
|
void |
clear()
Set empty this FtpDir, mark it unReady.
|
protected String |
consolidatePath(String path)
Consolidate Path as relative or absolute path to an absolute path
|
protected String |
getCanonicalPath(File dir)
Construct the CanonicalPath without taking into account symbolic link
|
protected File |
getCorrespondingRoot(File file) |
OptsMLSxInterface |
getOptsMLSx() |
String |
getPwd() |
SessionInterface |
getSession() |
void |
initAfterIdentification()
Init DirInterface after authentication is done
|
boolean |
isAbsolute(String path) |
protected boolean |
isPathInCurrentDir(File dir)
Validate a file according to the current Directory
|
boolean |
isPathInCurrentDir(String path)
Check if the given path is valid in the sens starting from the current
directory
|
static String |
normalizePath(String path)
Normalize Path to Internal unique representation
|
static String |
pathFromURI(String path)
Convert the URI representation of a file path to a simple path.
|
FileInterface |
setFile(String path,
boolean append)
Set a path as the current FileInterface
|
protected String |
validatePath(File dir)
Same as validatePath but from a FileInterface
|
String |
validatePath(String path)
Construct and Check if the given path is valid from business point of
view
(see
AuthInterface) |
protected abstract List<String> |
wildcardFiles(String pathWithWildcard)
Finds all files matching a wildcard expression (based on '?'
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanRead, canWrite, changeDirectory, changeDirectoryNotChecked, exists, fileFull, getCRC, getDigest, getFreeSpace, getMD5, getModificationTime, getSHA1, isDirectory, isFile, list, listFull, mkdir, newFile, rmdir, setUniqueFileprotected String currentDir
protected SessionInterface session
protected OptsMLSxInterface optsMLSx
protected static final Boolean ISUNIX
protected static final File[] roots
protected File getCorrespondingRoot(File file)
file - public static String normalizePath(String path)
path - public static String pathFromURI(String path)
If the path is not an URI, this method does nothing.
path - public SessionInterface getSession()
getSession in interface DirInterfacepublic String validatePath(String path) throws CommandAbstractException
DirInterfaceAuthInterface)validatePath in interface DirInterfaceCommandAbstractExceptionpublic boolean isAbsolute(String path)
path - protected String consolidatePath(String path) throws CommandAbstractException
path - CommandAbstractExceptionprotected String getCanonicalPath(File dir)
dir - protected String validatePath(File dir) throws CommandAbstractException
dir - CommandAbstractExceptionpublic boolean isPathInCurrentDir(String path)
DirInterfaceisPathInCurrentDir in interface DirInterfaceprotected boolean isPathInCurrentDir(File dir)
dir - CommandAbstractExceptionprotected abstract List<String> wildcardFiles(String pathWithWildcard) throws CommandAbstractException
pathWithWildcard - The wildcard expression with a business
path.CommandAbstractExceptionpublic String getPwd() throws CommandAbstractException
getPwd in interface DirInterfaceCommandAbstractExceptionpublic boolean changeParentDirectory()
throws CommandAbstractException
DirInterfacechangeParentDirectory in interface DirInterfaceCommandAbstractExceptionpublic FileInterface setFile(String path, boolean append) throws CommandAbstractException
DirInterfacesetFile in interface DirInterfaceappend - True if this file is supposed to be in append mode
(APPE), False in any other casesCommandAbstractExceptionpublic void checkIdentify()
throws Reply530Exception
DirInterfacecheckIdentify in interface DirInterfaceReply530Exceptionpublic void clear()
DirInterfaceclear in interface DirInterfacepublic void initAfterIdentification()
DirInterfaceinitAfterIdentification in interface DirInterfacepublic OptsMLSxInterface getOptsMLSx()
getOptsMLSx in interface DirInterfaceCopyright © 2009–2020 Waarp. All rights reserved.