P
- the type of path used by the provider's file systemspublic abstract class BaseFileSystemProvider<P extends BasePath<P>> extends FileSystemProvider
FileSystemProvider
implementation that provides common
functionality and additional structure for subclasses.Modifier | Constructor and Description |
---|---|
protected |
BaseFileSystemProvider(Class<P> pathClass) |
Modifier and Type | Method and Description |
---|---|
void |
checkAccess(Path path,
AccessMode... modes) |
P |
checkPath(Path p) |
void |
createDirectory(Path dir,
FileAttribute<?>... attrs) |
void |
delete(Path path) |
<V extends FileAttributeView> |
getFileAttributeView(Path path,
Class<V> type,
LinkOption... options) |
boolean |
isCompatible(Path p) |
boolean |
isHidden(Path path) |
boolean |
isSameFile(Path path,
Path path2) |
SeekableByteChannel |
newByteChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs) |
DirectoryStream<Path> |
newDirectoryStream(Path dir,
DirectoryStream.Filter<? super Path> filter) |
<A extends BasicFileAttributes> |
readAttributes(Path path,
Class<A> type,
LinkOption... options) |
Map<String,Object> |
readAttributes(Path path,
String viewAndAttributes,
LinkOption... options) |
void |
setAttribute(Path path,
String attribute,
Object value,
LinkOption... options) |
copy, createLink, createSymbolicLink, deleteIfExists, getFileStore, getFileSystem, getPath, getScheme, installedProviders, move, newAsynchronousFileChannel, newFileChannel, newFileSystem, newFileSystem, newInputStream, newOutputStream, readSymbolicLink
public final boolean isCompatible(Path p)
public void delete(Path path) throws IOException
delete
in class FileSystemProvider
IOException
public boolean isHidden(Path path) throws IOException
isHidden
in class FileSystemProvider
IOException
public void checkAccess(Path path, AccessMode... modes) throws IOException
checkAccess
in class FileSystemProvider
IOException
public boolean isSameFile(Path path, Path path2) throws IOException
isSameFile
in class FileSystemProvider
IOException
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options)
getFileAttributeView
in class FileSystemProvider
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException
newByteChannel
in class FileSystemProvider
IOException
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException
newDirectoryStream
in class FileSystemProvider
IOException
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException
createDirectory
in class FileSystemProvider
IOException
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException
readAttributes
in class FileSystemProvider
IOException
public final Map<String,Object> readAttributes(Path path, String viewAndAttributes, LinkOption... options) throws IOException
readAttributes
in class FileSystemProvider
IOException
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException
setAttribute
in class FileSystemProvider
IOException