Package com.google.common.jimfs
Class SystemJimfsFileSystemProvider
java.lang.Object
java.nio.file.spi.FileSystemProvider
com.google.common.jimfs.SystemJimfsFileSystemProvider
FileSystemProvider implementation for Jimfs that is loaded by the system as a service.
This implementation only serves as a cache for file system instances and does not implement
actual file system operations.
While this class is public, it should not be used directly. To create a new file system
instance, see Jimfs. For other operations, use the public APIs in java.nio.file.
- Since:
- 1.1
- Author:
- Colin Decker
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Not intended to be called directly; this class is only for use by Java itself. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAccess(Path path, AccessMode... modes) voidcopy(Path source, Path target, CopyOption... options) voidcreateDirectory(Path dir, FileAttribute<?>... attrs) void<V extends FileAttributeView>
VgetFileAttributeView(Path path, Class<V> type, LinkOption... options) getFileStore(Path path) getFileSystem(URI uri) booleanbooleanisSameFile(Path path, Path path2) voidmove(Path source, Path target, CopyOption... options) newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) newFileSystem(URI uri, Map<String, ?> env) newFileSystem(Path path, Map<String, ?> env) <A extends BasicFileAttributes>
AreadAttributes(Path path, Class<A> type, LinkOption... options) readAttributes(Path path, String attributes, LinkOption... options) static RunnableReturns a runnable that, when run, removes the file system with the given URI from this provider.voidsetAttribute(Path path, String attribute, Object value, LinkOption... options) Methods inherited from class java.nio.file.spi.FileSystemProvider
createLink, createSymbolicLink, deleteIfExists, exists, installedProviders, newAsynchronousFileChannel, newFileChannel, newInputStream, newOutputStream, readAttributesIfExists, readSymbolicLink
-
Constructor Details
-
SystemJimfsFileSystemProvider
Deprecated.Not intended to be called directly; this class is only for use by Java itself.
-
-
Method Details
-
getScheme
- Specified by:
getSchemein classFileSystemProvider
-
newFileSystem
- Specified by:
newFileSystemin classFileSystemProvider- Throws:
IOException
-
getFileSystem
- Specified by:
getFileSystemin classFileSystemProvider
-
getPath
- Specified by:
getPathin classFileSystemProvider
-
newFileSystem
- Overrides:
newFileSystemin classFileSystemProvider- Throws:
IOException
-
removeFileSystemRunnable
Returns a runnable that, when run, removes the file system with the given URI from this provider. -
newByteChannel
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Specified by:
newByteChannelin classFileSystemProvider- Throws:
IOException
-
newDirectoryStream
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException - Specified by:
newDirectoryStreamin classFileSystemProvider- Throws:
IOException
-
createDirectory
- Specified by:
createDirectoryin classFileSystemProvider- Throws:
IOException
-
delete
- Specified by:
deletein classFileSystemProvider- Throws:
IOException
-
copy
- Specified by:
copyin classFileSystemProvider- Throws:
IOException
-
move
- Specified by:
movein classFileSystemProvider- Throws:
IOException
-
isSameFile
- Specified by:
isSameFilein classFileSystemProvider- Throws:
IOException
-
isHidden
- Specified by:
isHiddenin classFileSystemProvider- Throws:
IOException
-
getFileStore
- Specified by:
getFileStorein classFileSystemProvider- Throws:
IOException
-
checkAccess
- Specified by:
checkAccessin classFileSystemProvider- Throws:
IOException
-
getFileAttributeView
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options) - Specified by:
getFileAttributeViewin classFileSystemProvider
-
readAttributes
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException - Specified by:
readAttributesin classFileSystemProvider- Throws:
IOException
-
readAttributes
public Map<String,Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOException - Specified by:
readAttributesin classFileSystemProvider- Throws:
IOException
-
setAttribute
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException - Specified by:
setAttributein classFileSystemProvider- Throws:
IOException
-