Package com.aoapps.io.filesystems.posix
Class ReadOnlyPosixFileSystem
java.lang.Object
com.aoapps.io.filesystems.FileSystemWrapper
com.aoapps.io.filesystems.ReadOnlyFileSystem
com.aoapps.io.filesystems.posix.ReadOnlyPosixFileSystem
- All Implemented Interfaces:
FileSystem
,PosixFileSystem
Wraps a Unix 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, int mode) Atomically creates a directory (must not have already existed) with the given permissions.createFile
(Path path, int mode) Atomically creates an empty file (must not have already existed) with the given permissions.Delegates to the wrapped file system.Methods inherited from class com.aoapps.io.filesystems.ReadOnlyFileSystem
createDirectory, createFile, delete
Methods inherited from class com.aoapps.io.filesystems.FileSystemWrapper
checkSubPath, join, list, lock, parsePath, size, unwrapPath, wrapPath, wrapSubPath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aoapps.io.filesystems.FileSystem
createDirectory, createFile, delete, join, list, lock, parsePath, size
Methods inherited from interface com.aoapps.io.filesystems.posix.PosixFileSystem
checkSubPath
-
Constructor Details
-
ReadOnlyPosixFileSystem
-
-
Method Details
-
stat
Delegates to the wrapped file system.- Specified by:
stat
in interfacePosixFileSystem
- Parameters:
path
- Must be from this file system.- Throws:
IOException
-
createFile
Description copied from interface:PosixFileSystem
Atomically creates an empty file (must not have already existed) with the given permissions.- Specified by:
createFile
in interfacePosixFileSystem
- Returns:
- returns the path
- Throws:
ReadOnlyFileSystemException
-
createDirectory
Description copied from interface:PosixFileSystem
Atomically creates a directory (must not have already existed) with the given permissions.- Specified by:
createDirectory
in interfacePosixFileSystem
- Returns:
- returns the path
- Throws:
ReadOnlyFileSystemException
-