java.lang.Object
com.aoapps.io.filesystems.FileSystemWrapper
com.aoapps.io.filesystems.ReadOnlyFileSystem
- All Implemented Interfaces:
FileSystem
Wraps a file system to make it read-only.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.aoapps.io.filesystems.FileSystemWrapper
FileSystemWrapper.PathIteratorWrapper, FileSystemWrapper.PathWrapper
-
Field Summary
Fields inherited from class com.aoapps.io.filesystems.FileSystemWrapper
wrappedFileSystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDirectory
(Path path) Atomically creates a directory (must not have already existed).createFile
(Path path) Atomically creates an empty file (must not have already existed).void
Deletes the file system object at the given path.Methods inherited from class com.aoapps.io.filesystems.FileSystemWrapper
checkSubPath, join, list, lock, parsePath, size, unwrapPath, wrapPath, wrapSubPath
-
Constructor Details
-
ReadOnlyFileSystem
-
-
Method Details
-
delete
Description copied from interface:FileSystem
Deletes the file system object at the given path.- Specified by:
delete
in interfaceFileSystem
- Overrides:
delete
in classFileSystemWrapper
- Parameters:
path
- Must be from this file system.- Throws:
ReadOnlyFileSystemException
-
createFile
Description copied from interface:FileSystem
Atomically creates an empty file (must not have already existed).- Specified by:
createFile
in interfaceFileSystem
- Overrides:
createFile
in classFileSystemWrapper
- Returns:
- returns the path
- Throws:
ReadOnlyFileSystemException
-
createDirectory
Description copied from interface:FileSystem
Atomically creates a directory (must not have already existed).- Specified by:
createDirectory
in interfaceFileSystem
- Overrides:
createDirectory
in classFileSystemWrapper
- Returns:
- returns the path
- Throws:
ReadOnlyFileSystemException
-