Package org.apache.lucene.tests.mockfile
Class VerboseFS
java.lang.Object
java.nio.file.spi.FileSystemProvider
org.apache.lucene.tests.mockfile.FilterFileSystemProvider
org.apache.lucene.tests.mockfile.VerboseFS
FileSystem that records all major destructive filesystem activities.
-
Field Summary
Fields inherited from class org.apache.lucene.tests.mockfile.FilterFileSystemProvider
delegate, fileSystem, scheme
-
Constructor Summary
ConstructorDescriptionVerboseFS
(FileSystem delegate, InfoStream infoStream) Create a new instance, recording major filesystem write activities (create, delete, etc) to the specifiedInfoStream
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(Path source, Path target, CopyOption... options) void
createDirectory
(Path dir, FileAttribute<?>... attrs) void
createLink
(Path link, Path existing) void
createSymbolicLink
(Path link, Path target, FileAttribute<?>... attrs) void
boolean
deleteIfExists
(Path path) void
move
(Path source, Path target, CopyOption... options) newAsynchronousFileChannel
(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) newByteChannel
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) newFileChannel
(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) newOutputStream
(Path path, OpenOption... options) void
setAttribute
(Path path, String attribute, Object value, LinkOption... options) Methods inherited from class org.apache.lucene.tests.mockfile.FilterFileSystemProvider
checkAccess, getFileAttributeView, getFileStore, getFileSystem, getPath, getScheme, isHidden, isSameFile, newDirectoryStream, newFileSystem, newFileSystem, newInputStream, onClose, readAttributes, readAttributes, readSymbolicLink, toDelegate, toString
Methods inherited from class java.nio.file.spi.FileSystemProvider
installedProviders
-
Constructor Details
-
VerboseFS
Create a new instance, recording major filesystem write activities (create, delete, etc) to the specifiedInfoStream
.- Parameters:
delegate
- delegate filesystem to wrap.infoStream
- infoStream to send messages to. The component for messages is named "FS".
-
-
Method Details
-
createDirectory
- Overrides:
createDirectory
in classFilterFileSystemProvider
- Throws:
IOException
-
delete
- Overrides:
delete
in classFilterFileSystemProvider
- Throws:
IOException
-
copy
- Overrides:
copy
in classFilterFileSystemProvider
- Throws:
IOException
-
move
- Overrides:
move
in classFilterFileSystemProvider
- Throws:
IOException
-
setAttribute
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException - Overrides:
setAttribute
in classFilterFileSystemProvider
- Throws:
IOException
-
newOutputStream
- Overrides:
newOutputStream
in classFilterFileSystemProvider
- Throws:
IOException
-
newFileChannel
public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Overrides:
newFileChannel
in classFilterFileSystemProvider
- Throws:
IOException
-
newAsynchronousFileChannel
public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException - Overrides:
newAsynchronousFileChannel
in classFilterFileSystemProvider
- Throws:
IOException
-
newByteChannel
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Overrides:
newByteChannel
in classFilterFileSystemProvider
- Throws:
IOException
-
createSymbolicLink
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws IOException - Overrides:
createSymbolicLink
in classFilterFileSystemProvider
- Throws:
IOException
-
createLink
- Overrides:
createLink
in classFilterFileSystemProvider
- Throws:
IOException
-
deleteIfExists
- Overrides:
deleteIfExists
in classFilterFileSystemProvider
- Throws:
IOException
-