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
ConstructorsConstructorDescriptionVerboseFS(FileSystem delegate, InfoStream infoStream) Create a new instance, recording major filesystem write activities (create, delete, etc) to the specifiedInfoStream. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy(Path source, Path target, CopyOption... options) voidcreateDirectory(Path dir, FileAttribute<?>... attrs) voidcreateLink(Path link, Path existing) voidcreateSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) voidbooleandeleteIfExists(Path path) voidmove(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) voidsetAttribute(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, wrapPathMethods inherited from class java.nio.file.spi.FileSystemProvider
exists, installedProviders, readAttributesIfExists
-
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:
createDirectoryin classFilterFileSystemProvider- Throws:
IOException
-
delete
- Overrides:
deletein classFilterFileSystemProvider- Throws:
IOException
-
copy
- Overrides:
copyin classFilterFileSystemProvider- Throws:
IOException
-
move
- Overrides:
movein classFilterFileSystemProvider- Throws:
IOException
-
setAttribute
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException - Overrides:
setAttributein classFilterFileSystemProvider- Throws:
IOException
-
newOutputStream
- Overrides:
newOutputStreamin classFilterFileSystemProvider- Throws:
IOException
-
newFileChannel
public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Overrides:
newFileChannelin classFilterFileSystemProvider- Throws:
IOException
-
newAsynchronousFileChannel
public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException - Overrides:
newAsynchronousFileChannelin classFilterFileSystemProvider- Throws:
IOException
-
newByteChannel
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Overrides:
newByteChannelin classFilterFileSystemProvider- Throws:
IOException
-
createSymbolicLink
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws IOException - Overrides:
createSymbolicLinkin classFilterFileSystemProvider- Throws:
IOException
-
createLink
- Overrides:
createLinkin classFilterFileSystemProvider- Throws:
IOException
-
deleteIfExists
- Overrides:
deleteIfExistsin classFilterFileSystemProvider- Throws:
IOException
-