Package org.apache.lucene.tests.mockfile
Class VirusCheckingFS
java.lang.Object
java.nio.file.spi.FileSystemProvider
org.apache.lucene.tests.mockfile.FilterFileSystemProvider
org.apache.lucene.tests.mockfile.VirusCheckingFS
Acts like a virus checker on Windows, where random programs may open the files you just wrote in
an unfriendly way preventing deletion (e.g. not passing FILE_SHARE_DELETE) or renaming or
overwriting etc. This is more evil than WindowsFS which just prevents deletion of files you still
old open.
-
Field Summary
Fields inherited from class org.apache.lucene.tests.mockfile.FilterFileSystemProvider
delegate, fileSystem, scheme
-
Constructor Summary
ConstructorDescriptionVirusCheckingFS
(FileSystem delegate, long salt) Create a new instance, wrappingdelegate
. -
Method Summary
Methods inherited from class org.apache.lucene.tests.mockfile.FilterFileSystemProvider
checkAccess, copy, createDirectory, createLink, createSymbolicLink, deleteIfExists, getFileAttributeView, getFileStore, getFileSystem, getPath, getScheme, isHidden, isSameFile, move, newAsynchronousFileChannel, newByteChannel, newDirectoryStream, newFileChannel, newFileSystem, newFileSystem, newInputStream, newOutputStream, onClose, readAttributes, readAttributes, readSymbolicLink, setAttribute, toDelegate, toString
Methods inherited from class java.nio.file.spi.FileSystemProvider
installedProviders
-
Constructor Details
-
VirusCheckingFS
Create a new instance, wrappingdelegate
.
-
-
Method Details
-
enable
public void enable() -
isEnabled
public boolean isEnabled() -
disable
public void disable() -
delete
- Overrides:
delete
in classFilterFileSystemProvider
- Throws:
IOException
-