Package com.google.common.jimfs
Class SystemJimfsFileSystemProvider
- java.lang.Object
-
- java.nio.file.spi.FileSystemProvider
-
- com.google.common.jimfs.SystemJimfsFileSystemProvider
-
public final class SystemJimfsFileSystemProvider extends java.nio.file.spi.FileSystemProvider
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 injava.nio.file
.- Since:
- 1.1
- Author:
- Colin Decker
-
-
Constructor Summary
Constructors Constructor Description SystemJimfsFileSystemProvider()
Deprecated.Not intended to be called directly; this class is only for use by Java itself.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAccess(java.nio.file.Path path, java.nio.file.AccessMode... modes)
void
copy(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)
void
createDirectory(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)
void
delete(java.nio.file.Path path)
<V extends java.nio.file.attribute.FileAttributeView>
VgetFileAttributeView(java.nio.file.Path path, java.lang.Class<V> type, java.nio.file.LinkOption... options)
java.nio.file.FileStore
getFileStore(java.nio.file.Path path)
java.nio.file.FileSystem
getFileSystem(java.net.URI uri)
java.nio.file.Path
getPath(java.net.URI uri)
java.lang.String
getScheme()
boolean
isHidden(java.nio.file.Path path)
boolean
isSameFile(java.nio.file.Path path, java.nio.file.Path path2)
void
move(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)
java.nio.channels.SeekableByteChannel
newByteChannel(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs)
java.nio.file.DirectoryStream<java.nio.file.Path>
newDirectoryStream(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
java.nio.file.FileSystem
newFileSystem(java.net.URI uri, java.util.Map<java.lang.String,?> env)
java.nio.file.FileSystem
newFileSystem(java.nio.file.Path path, java.util.Map<java.lang.String,?> env)
<A extends java.nio.file.attribute.BasicFileAttributes>
AreadAttributes(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options)
java.util.Map<java.lang.String,java.lang.Object>
readAttributes(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options)
static java.lang.Runnable
removeFileSystemRunnable(java.net.URI uri)
Returns a runnable that, when run, removes the file system with the given URI from this provider.void
setAttribute(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options)
-
-
-
Method Detail
-
getScheme
public java.lang.String getScheme()
- Specified by:
getScheme
in classjava.nio.file.spi.FileSystemProvider
-
newFileSystem
public java.nio.file.FileSystem newFileSystem(java.net.URI uri, java.util.Map<java.lang.String,?> env) throws java.io.IOException
- Specified by:
newFileSystem
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
getFileSystem
public java.nio.file.FileSystem getFileSystem(java.net.URI uri)
- Specified by:
getFileSystem
in classjava.nio.file.spi.FileSystemProvider
-
getPath
public java.nio.file.Path getPath(java.net.URI uri)
- Specified by:
getPath
in classjava.nio.file.spi.FileSystemProvider
-
newFileSystem
public java.nio.file.FileSystem newFileSystem(java.nio.file.Path path, java.util.Map<java.lang.String,?> env) throws java.io.IOException
- Overrides:
newFileSystem
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
removeFileSystemRunnable
public static java.lang.Runnable removeFileSystemRunnable(java.net.URI uri)
Returns a runnable that, when run, removes the file system with the given URI from this provider.
-
newByteChannel
public java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs) throws java.io.IOException
- Specified by:
newByteChannel
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
newDirectoryStream
public java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter) throws java.io.IOException
- Specified by:
newDirectoryStream
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
createDirectory
public void createDirectory(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs) throws java.io.IOException
- Specified by:
createDirectory
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
delete
public void delete(java.nio.file.Path path) throws java.io.IOException
- Specified by:
delete
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
copy
public void copy(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options) throws java.io.IOException
- Specified by:
copy
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
move
public void move(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options) throws java.io.IOException
- Specified by:
move
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
isSameFile
public boolean isSameFile(java.nio.file.Path path, java.nio.file.Path path2) throws java.io.IOException
- Specified by:
isSameFile
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
isHidden
public boolean isHidden(java.nio.file.Path path) throws java.io.IOException
- Specified by:
isHidden
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
getFileStore
public java.nio.file.FileStore getFileStore(java.nio.file.Path path) throws java.io.IOException
- Specified by:
getFileStore
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
checkAccess
public void checkAccess(java.nio.file.Path path, java.nio.file.AccessMode... modes) throws java.io.IOException
- Specified by:
checkAccess
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
getFileAttributeView
public <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(java.nio.file.Path path, java.lang.Class<V> type, java.nio.file.LinkOption... options)
- Specified by:
getFileAttributeView
in classjava.nio.file.spi.FileSystemProvider
-
readAttributes
public <A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options) throws java.io.IOException
- Specified by:
readAttributes
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
readAttributes
public java.util.Map<java.lang.String,java.lang.Object> readAttributes(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options) throws java.io.IOException
- Specified by:
readAttributes
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
setAttribute
public void setAttribute(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options) throws java.io.IOException
- Specified by:
setAttribute
in classjava.nio.file.spi.FileSystemProvider
- Throws:
java.io.IOException
-
-