public abstract class AbstractFileSystemProvider extends FileSystemProvider
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFileSystemProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Path file)
Deletes a file.
|
boolean |
deleteIfExists(Path file)
Deletes a file if it exists.
|
boolean |
exists(Path file)
Checks the existence of a file.
|
boolean |
isDirectory(Path file)
Tests whether a file is a directory.
|
boolean |
isRegularFile(Path file)
Tests whether a file is a regular file with opaque content.
|
Map<String,Object> |
readAttributes(Path file,
String attributes,
LinkOption... options)
Reads a set of file attributes as a bulk operation.
|
void |
setAttribute(Path file,
String attribute,
Object value,
LinkOption... options)
Sets the value of a file attribute.
|
checkAccess, copy, createDirectory, createLink, createSymbolicLink, getFileAttributeView, getFileStore, getFileSystem, getPath, getScheme, installedProviders, isHidden, isSameFile, move, newAsynchronousFileChannel, newByteChannel, newDirectoryStream, newFileChannel, newFileSystem, newFileSystem, newInputStream, newOutputStream, readAttributes, readSymbolicLinkpublic final void setAttribute(Path file, String attribute, Object value, LinkOption... options) throws IOException
FileSystemProviderFiles.setAttribute(java.nio.file.Path, java.lang.String, java.lang.Object, java.nio.file.LinkOption...) method.setAttribute in class FileSystemProviderfile - the path to the fileattribute - the attribute to setvalue - the attribute valueoptions - options indicating how symbolic links are handledIOException - If an I/O error occurspublic final Map<String,Object> readAttributes(Path file, String attributes, LinkOption... options) throws IOException
FileSystemProviderFiles.readAttributes(Path,String,LinkOption[]) method.readAttributes in class FileSystemProviderfile - the path to the fileattributes - the attributes to readoptions - options indicating how symbolic links are handledIOException - If an I/O error occurspublic final void delete(Path file) throws IOException
FileSystemProviderFiles.delete(java.nio.file.Path) method.delete in class FileSystemProviderfile - the path to the file to deleteNoSuchFileException - if the file does not exist (optional specific exception)DirectoryNotEmptyException - if the file is a directory and could not otherwise be deleted
because the directory is not empty (optional specific
exception)IOException - if an I/O error occurspublic final boolean deleteIfExists(Path file) throws IOException
FileSystemProviderFiles.deleteIfExists(java.nio.file.Path) method.
The default implementation of this method simply invokes FileSystemProvider.delete(java.nio.file.Path) ignoring the NoSuchFileException when the file does not
exist. It may be overridden where appropriate.
deleteIfExists in class FileSystemProviderfile - the path to the file to deletetrue if the file was deleted by this method; false if the file could not be deleted because it did not
existDirectoryNotEmptyException - if the file is a directory and could not otherwise be deleted
because the directory is not empty (optional specific
exception)IOException - if an I/O error occurspublic boolean isDirectory(Path file)
true if the file is a directory; false if
the file does not exist, is not a directory, or it cannot
be determined if the file is a directory or not.public boolean isRegularFile(Path file)
true if the file is a regular file; false if
the file does not exist, is not a regular file, or it
cannot be determined if the file is a regular file or not.public boolean exists(Path file)
true if the file exists; false if the file does
not exist or its existence cannot be determined.