public class CompositeFileSystem extends Object implements FileSystem
| Constructor and Description |
|---|
CompositeFileSystem(FileSystem[] delegates)
Creates a new
FileSystem that will delegate to each of the supplied delegate FileSystem in turn
until a matching entry is found. |
| Modifier and Type | Method and Description |
|---|---|
Entry |
get(String path) |
long |
getLastModified(DirectoryEntry entry) |
DirectoryEntry |
getRoot() |
Entry[] |
listEntries(DirectoryEntry directory) |
DirectoryEntry |
mkdir(DirectoryEntry parent,
String name) |
FileEntry |
put(DirectoryEntry parent,
String name,
byte[] content) |
FileEntry |
put(DirectoryEntry parent,
String name,
InputStream content) |
void |
remove(Entry entry) |
public CompositeFileSystem(FileSystem[] delegates)
FileSystem that will delegate to each of the supplied delegate FileSystem in turn
until a matching entry is found.delegates - the delegate FileSystems (in order of preference).public Entry[] listEntries(DirectoryEntry directory)
listEntries in interface FileSystempublic Entry get(String path)
get in interface FileSystempublic long getLastModified(DirectoryEntry entry) throws IOException
getLastModified in interface FileSystemIOExceptionpublic DirectoryEntry getRoot()
getRoot in interface FileSystempublic DirectoryEntry mkdir(DirectoryEntry parent, String name)
mkdir in interface FileSystempublic FileEntry put(DirectoryEntry parent, String name, InputStream content) throws IOException
put in interface FileSystemIOExceptionpublic FileEntry put(DirectoryEntry parent, String name, byte[] content) throws IOException
put in interface FileSystemIOExceptionpublic void remove(Entry entry)
remove in interface FileSystemCopyright © 2009–2022 MojoHaus. All rights reserved.