Package com.aoapps.io.filesystems.posix
Interface PosixFileSystem
- All Superinterfaces:
FileSystem
- All Known Implementing Classes:
DedupPosixFileSystem
,DefaultPosixFileSystem
,RandomFailPosixFileSystem
,ReadOnlyPosixFileSystem
,TempPosixFileSystem
The most basic layer of what Unix file systems have in common.
Note: The JVM must be in a single-byte locale, such as "C", "POSIX", or "en_US". PosixFile makes this assumption in its JNI implementation.
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
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 interface com.aoapps.io.filesystems.FileSystem
createDirectory, createFile, delete, join, list, lock, parsePath, size
-
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
- Throws:
InvalidPathException
- Must not be longer than
-
stat
Stats the given path.- Parameters:
path
- Must be from this file system.- Throws:
IOException
-
createFile
Atomically creates an empty file (must not have already existed) with the given permissions.- Returns:
- returns the path
- Throws:
UnsupportedOperationException
- if unable to create atomicallyFileAlreadyExistsException
- if file already existsIOException
- if an underlying I/O error occurs.
-
createDirectory
Atomically creates a directory (must not have already existed) with the given permissions.- Returns:
- returns the path
- Throws:
UnsupportedOperationException
- if unable to create atomicallyFileAlreadyExistsException
- if file already existsIOException
- if an underlying I/O error occurs.
-