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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckSubPath(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, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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_LENGTHcharacters - Must not contain the NULL character
- Must not contain the '/' character
- Must not be "."
- Must not be ".."
- Specified by:
checkSubPathin interfaceFileSystem- Specified by:
checkSubPathin interfacePosixFileSystem- Overrides:
checkSubPathin classTempFileSystem- Throws:
InvalidPathException- See Also:
- Must not be longer than
-
stat
Description copied from interface:PosixFileSystemStats the given path.- Specified by:
statin interfacePosixFileSystem- Parameters:
path- Must be from this file system.
-
createFile
Description copied from interface:PosixFileSystemAtomically creates an empty file (must not have already existed) with the given permissions.- Specified by:
createFilein interfacePosixFileSystem- Returns:
- returns the path
-
createDirectory
Description copied from interface:PosixFileSystemAtomically creates a directory (must not have already existed) with the given permissions.- Specified by:
createDirectoryin interfacePosixFileSystem- Returns:
- returns the path
-
