P
- the type of path used by the file systempublic abstract class BaseFileSystem<P extends BasePath<P>> extends FileSystem
FileSystem
implementation that provides common
functionality and additional structure for subclasses.Constructor and Description |
---|
BaseFileSystem() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
checkAccess(P path,
AccessMode... modes) |
protected abstract void |
createDirectory(P path,
FileAttribute<?>... attrs) |
abstract P |
defaultDirectory()
Returns the default directory of this file system.
|
protected abstract void |
delete(P path) |
abstract FileAttributeViewRegistry |
fileAttributeViews() |
protected abstract P |
getPath(String path)
Converts a single path string with separators to a
Path object. |
P |
getPath(String first,
String... more) |
PathMatcher |
getPathMatcher(String syntaxAndPattern) |
UserPrincipalLookupService |
getUserPrincipalLookupService() |
protected abstract boolean |
isHidden(P path) |
protected abstract boolean |
isSameFile(P path,
P other)
Determines two non-equal paths refer to the same file.
|
protected abstract SeekableByteChannel |
newByteChannel(P path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs) |
protected abstract DirectoryStream<Path> |
newDirectoryStream(P dir,
DirectoryStream.Filter<? super Path> filter) |
WatchService |
newWatchService() |
abstract BaseFileSystemProvider<P> |
provider() |
Set<String> |
supportedFileAttributeViews() |
abstract URI |
uri()
Returns this file system's URI.
|
close, getFileStores, getRootDirectories, getSeparator, isOpen, isReadOnly
public abstract BaseFileSystemProvider<P> provider()
provider
in class FileSystem
public abstract P defaultDirectory()
public abstract URI uri()
getFileSystem
should
return this file system instance.public P getPath(String first, String... more)
getPath
in class FileSystem
protected abstract P getPath(String path)
Path
object.getPath(String, String...)
public PathMatcher getPathMatcher(String syntaxAndPattern)
getPathMatcher
in class FileSystem
public UserPrincipalLookupService getUserPrincipalLookupService()
getUserPrincipalLookupService
in class FileSystem
public WatchService newWatchService() throws IOException
newWatchService
in class FileSystem
IOException
public final Set<String> supportedFileAttributeViews()
supportedFileAttributeViews
in class FileSystem
public abstract FileAttributeViewRegistry fileAttributeViews()
protected abstract void delete(P path) throws IOException
IOException
protected abstract boolean isHidden(P path) throws IOException
IOException
protected abstract void checkAccess(P path, AccessMode... modes) throws IOException
IOException
protected abstract boolean isSameFile(P path, P other) throws IOException
path
is always associated with this file system, other
may be
associated with a different file system from the same provider.IOException
protected abstract void createDirectory(P path, FileAttribute<?>... attrs) throws IOException
IOException
protected abstract SeekableByteChannel newByteChannel(P path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
IOException
protected abstract DirectoryStream<Path> newDirectoryStream(P dir, DirectoryStream.Filter<? super Path> filter) throws IOException
IOException