Package com.aoapps.io.filesystems.posix
Class DefaultPosixFileSystem
java.lang.Object
com.aoapps.io.filesystems.JavaFileSystem
com.aoapps.io.filesystems.posix.DefaultPosixFileSystem
- All Implemented Interfaces:
FileSystem
,PosixFileSystem
The Unix file system implement by the PosixFile.
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Fields inherited from class com.aoapps.io.filesystems.JavaFileSystem
isSingleRoot, javaFileSystem, MAX_PATH_NAME_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkSubPath
(Path parent, String name) Checks a sub-path.createDirectory
(Path path, int mode) TODO: This is not an atomic implementation.createFile
(Path path, int mode) TODO: This is not an atomic implementation.static DefaultPosixFileSystem
Only one instance is created.Stats the given path.Methods inherited from class com.aoapps.io.filesystems.JavaFileSystem
createDirectory, createFile, delete, getDefault, getJavaPath, 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
-
DefaultPosixFileSystem
protected DefaultPosixFileSystem()Creates a newDefaultPosixFileSystem
.
-
-
Method Details
-
getInstance
Only one instance is created. -
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 classJavaFileSystem
- 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.- Throws:
IOException
-
createFile
TODO: This is not an atomic implementation. Use the Java-provided interface, but beware it does not seem to have support for the sticky bits.- Specified by:
createFile
in interfacePosixFileSystem
- Returns:
- returns the path
- Throws:
IOException
- if an underlying I/O error occurs.
-
createDirectory
TODO: This is not an atomic implementation. Use the Java-provided interface, but beware it does not seem to have support for the sticky bits.- Specified by:
createDirectory
in interfacePosixFileSystem
- Returns:
- returns the path
- Throws:
IOException
- if an underlying I/O error occurs.
-