public class WindowsFakeFileSystem extends AbstractFakeFileSystem
FileSystem
interface that simulates a Microsoft
Windows file system. The rules for file and directory names include:
The directoryListingFormatter
property is automatically initialized to an instance
of WindowsDirectoryListingFormatter
.
Modifier and Type | Field and Description |
---|---|
static char |
SEPARATOR |
Constructor and Description |
---|
WindowsFakeFileSystem()
Construct a new instance and initialize the directoryListingFormatter to a WindowsDirectoryListingFormatter.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getFileSystemEntryKey(String path)
Return the normalized and unique key used to access the file system entry.
|
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, 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 WindowsFakeFileSystem()
protected String getFileSystemEntryKey(String path)
getFileSystemEntryKey
in class AbstractFakeFileSystem
path
- - the pathprotected 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.