public class DiskFileSystem extends BaseFileSystem
| Constructor and Description |
|---|
DiskFileSystem(File root)
Creates a new read-only instance.
|
DiskFileSystem(File root,
boolean readOnly)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(DirectoryEntry entry) |
Entry[] |
listEntries(DirectoryEntry directory) |
DirectoryEntry |
mkdir(DirectoryEntry parent,
String name) |
FileEntry |
put(DirectoryEntry parent,
String name,
InputStream content) |
void |
remove(Entry entry) |
get, get, getRoot, putpublic DiskFileSystem(File root, boolean readOnly)
root - the root of the file system.readOnly - true if the file system is to be read-onlypublic DiskFileSystem(File root)
root - the root of the file system.public Entry[] listEntries(DirectoryEntry directory)
public long getLastModified(DirectoryEntry entry) throws IOException
IOExceptionpublic DirectoryEntry mkdir(DirectoryEntry parent, String name)
mkdir in interface FileSystemmkdir in class BaseFileSystempublic FileEntry put(DirectoryEntry parent, String name, InputStream content) throws IOException
put in interface FileSystemput in class BaseFileSystemIOExceptionpublic void remove(Entry entry)
remove in interface FileSystemremove in class BaseFileSystemCopyright © 2009–2022 MojoHaus. All rights reserved.