public class ReadOnlyFileSystem extends FilterFileSystem
FileSystem.OpenStatem_fs| Constructor and Description |
|---|
ReadOnlyFileSystem(FileSystem fs)
Creates a new read-only file system.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String path)
Deletes a directory and all its contents.
|
void |
mkdir(java.lang.String path)
Creates a directory if it does not exist.
|
void |
rmdir(java.lang.String path)
Deletes a directory and all its contents.
|
java.io.OutputStream |
writeTo(java.lang.String filename)
Writes data to a file.
|
public ReadOnlyFileSystem(FileSystem fs)
fs - The underlying file system to regulate access topublic void mkdir(java.lang.String path)
throws FileSystemException
FileSystemmkdir in interface FileSystemmkdir in class FilterFileSystempath - The directory to create. The string can contain a path
relative to the current directory.FileSystemException - Thrown if the operation could not be performed
for some reasonpublic void rmdir(java.lang.String path)
throws FileSystemException
FileSystemrmdir in interface FileSystemrmdir in class FilterFileSystempath - The directory to deleteFileSystemException - Thrown if the operation could not be performed
for some reasonpublic void delete(java.lang.String path)
throws FileSystemException
FileSystemdelete in interface FileSystemdelete in class FilterFileSystempath - The directory to deleteFileSystemException - Thrown if the operation could not be performed
for some reasonpublic java.io.OutputStream writeTo(java.lang.String filename)
throws FileSystemException
FileSystemOutputStream to
which data can be printed. The data is guaranteed to be committed to the
file only when the print stream is closed. Whether data is written before
that moment depends on the actual file system implementation.writeTo in interface FileSystemwriteTo in class FilterFileSystemfilename - The name of the file to which data is to be writtenFileSystemException - Thrown if the operation could not be performed
for some reasonCopyright © Sylvain HallĂ©. All Rights Reserved.