org.apache.lucene.mockfile

## Class VirusCheckingFS

- java.lang.Object
- - java.nio.file.spi.FileSystemProvider
  - - org.apache.lucene.mockfile.FilterFileSystemProvider
    - - org.apache.lucene.mockfile.VirusCheckingFS

-     public class VirusCheckingFS
      extends FilterFileSystemProvider

  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.mockfile.FilterFileSystemProvider

      `delegate, fileSystem, scheme`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VirusCheckingFS(FileSystem delegate, long salt)` Create a new instance, wrapping `delegate`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete(Path path)`
    `void` | `disable()`
    `void` | `enable()`
    `boolean` | `isEnabled()`

    - ### Methods inherited from class org.apache.lucene.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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### VirusCheckingFS

          public VirusCheckingFS(FileSystem delegate,
                                 long salt)

      Create a new instance, wrapping `delegate`.

  - ### Method Detail

    - #### enable

          public void enable()

    - #### isEnabled

          public boolean isEnabled()

    - #### disable

          public void disable()

    - #### delete

          public void delete(Path path)
                      throws IOException

      Overrides:
        `delete` in class `FilterFileSystemProvider`
      Throws:
        `IOException`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.