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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckSubPath(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 DefaultPosixFileSystemOnly one instance is created.Stats the given path.Methods inherited from class com.aoapps.io.filesystems.JavaFileSystem
createDirectory, createFile, delete, getDefault, getJavaPath, 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
-
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_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 classJavaFileSystem- 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.- 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:
createFilein 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:
createDirectoryin interfacePosixFileSystem- Returns:
- returns the path
- Throws:
IOException- if an underlying I/O error occurs.
-
