Package com.aoapps.io.filesystems.posix
Class TempPosixFileSystem
java.lang.Object
com.aoapps.io.filesystems.TempFileSystem
com.aoapps.io.filesystems.posix.TempPosixFileSystem
- All Implemented Interfaces:
FileSystem
,PosixFileSystem
A temporary Unix file system stored in the Java heap.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.aoapps.io.filesystems.TempFileSystem
TempFileSystem.FileSystemObject
-
Field Summary
Fields inherited from class com.aoapps.io.filesystems.TempFileSystem
files
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkSubPath
(Path parent, String name) Checks a sub-path.createDirectory
(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.Stats the given path.Methods inherited from class com.aoapps.io.filesystems.TempFileSystem
createDirectory, createFile, delete, list, lock, size
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
-
Constructor Details
-
TempPosixFileSystem
public TempPosixFileSystem()
-
-
Method Details
-
checkSubPath
Checks a sub-path. Unix filename restrictions are:- Must not be longer than
MAX_PATH_NAME_LENGTH
characters - Must not contain the NULL character
- Must not contain the '/' character
- Must not be "."
- Must not be ".."
- Specified by:
checkSubPath
in interfaceFileSystem
- Specified by:
checkSubPath
in interfacePosixFileSystem
- Overrides:
checkSubPath
in classTempFileSystem
- Throws:
InvalidPathException
- See Also:
- Must not be longer than
-
stat
Description copied from interface:PosixFileSystem
Stats the given path.- Specified by:
stat
in interfacePosixFileSystem
- Parameters:
path
- Must be from this file system.
-
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
-
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
-