public class UnixFakeFileSystem extends AbstractFakeFileSystem
FileSystem
interface that simulates a Unix
file system. The rules for file and directory names include:
The directoryListingFormatter
property is automatically initialized to an instance
of UnixDirectoryListingFormatter
.
Modifier and Type | Field and Description |
---|---|
static char |
SEPARATOR |
Constructor and Description |
---|
UnixFakeFileSystem()
Construct a new instance and initialize the directoryListingFormatter to a UnixDirectoryListingFormatter.
|
Modifier and Type | Method and Description |
---|---|
protected char |
getSeparatorChar() |
protected boolean |
isRoot(String pathComponent) |
protected boolean |
isSeparator(char c)
Return true if the specified char is a separator character ('\' or '/')
|
protected boolean |
isValidName(String path)
Return true if the specified path designates a valid (absolute) file path.
|
add, checkForInvalidFilename, componentsToPath, delete, exists, formatDirectoryListing, getDirectoryListingFormatter, getEntry, getFileSystemEntryKey, getName, getParent, getRequiredEntry, getSeparator, isAbsolute, isCreateParentDirectoriesAutomatically, isDirectory, isFile, listFiles, listNames, normalize, normalizedComponents, path, rename, renamePath, setCreateParentDirectoriesAutomatically, setDirectoryListingFormatter, setEntries, toString
public static final char SEPARATOR
public UnixFakeFileSystem()
protected char getSeparatorChar()
getSeparatorChar
in class AbstractFakeFileSystem
protected boolean isValidName(String path)
isValidName
in class AbstractFakeFileSystem
path
- - the pathAssertionError
- - if path is nullprotected boolean isSeparator(char c)
isSeparator
in class AbstractFakeFileSystem
c
- - the character to testprotected boolean isRoot(String pathComponent)
isRoot
in class AbstractFakeFileSystem
pathComponent
- - the component (piece) of the path to checkCopyright © 2016. All rights reserved.