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, toStringpublic static final char SEPARATOR
public UnixFakeFileSystem()
protected char getSeparatorChar()
getSeparatorChar in class AbstractFakeFileSystemprotected boolean isValidName(String path)
isValidName in class AbstractFakeFileSystempath - - the pathAssertionError - - if path is nullprotected boolean isSeparator(char c)
isSeparator in class AbstractFakeFileSystemc - - the character to testprotected boolean isRoot(String pathComponent)
isRoot in class AbstractFakeFileSystempathComponent - - the component (piece) of the path to checkCopyright © 2016. All rights reserved.