public interface EightyFS
the methods can assume that all Path arguments are from this filesystem and absolute
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(EightyPath path,
AccessMode... modes)
Check Read, Write, Exec access
is called quite often for file existence
|
default void |
copy(EightyPath source,
EightyPath target,
CopyOption... options)
Copy with same provider (not necessarily same FS)
target does not exist
needs to send out watch events (if supported in FS)
|
void |
createDirectory(EightyPath dir,
FileAttribute<?>... attrs)
Create a new Directory
This method should work in the manner specified in the
Files.createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) method. |
default void |
createHardLink(EightyPath normLink,
EightyPath normExisting) |
default void |
createSymLink(EightyPath link,
EightyPath existing,
FileAttribute<?>[] attrs) |
void |
delete(EightyPath path)
Deletes the path as in
Files.move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)
but
- path is absolute
- is non empty
- exists
- is not root |
<V extends FileAttributeView> |
getFileAttributeView(EightyPath path,
Class<V> type) |
default FileStore |
getFileStore(EightyPath path) |
default Iterable<FileStore> |
getFileStores() |
default PathConstraints |
getPathConstraints() |
default Optional<EightySymLink> |
getSymlink(EightyPath path) |
default UserPrincipalLookupService |
getUserPrincipalLookupService() |
default boolean |
isClosable() |
default boolean |
isHidden(EightyPath paths) |
default boolean |
isReadOnly() |
default boolean |
isReopenable() |
default void |
move(EightyPath source,
EightyPath target)
Moves the content of source to path
This method works in mostly the manner
specified by the
Files.move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) method. |
default SeekableByteChannel |
newByteChannel(EightyPath path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs) |
default void |
newContent(EightyPath path) |
Stream<Path> |
newDirectoryStream(EightyPath dir) |
FileChannel |
newFileChannel(EightyPath path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
Creates new SeekableByteChannel to that path
This method works in mostly the manner
specified by the
Files.newByteChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) method. |
default void |
onClose() |
default void |
reopen() |
default void |
setReadOnly(boolean readOnly) |
default void |
setWatcher(EightyWatcher eightyFileSystem) |
default boolean |
supportsSymlinks() |
default boolean |
watchable() |
FileChannel newFileChannel(EightyPath path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
Files.newByteChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) method.
Differences to the general method: - The set of options is not empty - APPEND and READ are not both in the options - IF the file does not exist than WRITE and either CREATE or CREATE_NEW are in the options - If READ and no Create variants are in the options than the file exists - The path is not a directory - The path is absolute, normalized and has no sym link in its path - The channel needs to implement InformativeClosable - Parent path exists and is a directory
path - An absolute path of a filesystem of this provideroptions - A non empty set of options without any conflicts, see aboveattrs - attributesdefault SeekableByteChannel newByteChannel(EightyPath path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
void createDirectory(EightyPath dir, FileAttribute<?>... attrs)
Files.createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) method.
Differences are - dir is absolute - dirs parent is a dir and exists - dir does not exist
dir - attrs - void checkAccess(EightyPath path, AccessMode... modes)
Stream<Path> newDirectoryStream(EightyPath dir)
default void copy(EightyPath source, EightyPath target, CopyOption... options)
source - target - options - default void move(EightyPath source, EightyPath target)
Files.move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) method.
but:
source and target are absolute paths of the same filesystem
source path is sym link free
target does not exist
target parent does existsource - target - void delete(EightyPath path)
Files.move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)
but
- path is absolute
- is non empty
- exists
- is not rootpath - default FileStore getFileStore(EightyPath path)
<V extends FileAttributeView> V getFileAttributeView(EightyPath path, Class<V> type)
V - path - type - A supported FileAttributeViewdefault boolean isReadOnly()
default void setReadOnly(boolean readOnly)
default boolean isHidden(EightyPath paths)
default boolean isClosable()
default boolean watchable()
default boolean isReopenable()
default void reopen()
default void setWatcher(EightyWatcher eightyFileSystem)
default void createHardLink(EightyPath normLink, EightyPath normExisting)
default void createSymLink(EightyPath link, EightyPath existing, FileAttribute<?>[] attrs)
default Optional<EightySymLink> getSymlink(EightyPath path)
default boolean supportsSymlinks()
default void onClose()
default UserPrincipalLookupService getUserPrincipalLookupService()
default PathConstraints getPathConstraints()
default void newContent(EightyPath path)
Copyright © 2015. All rights reserved.