org.apache.lucene.mockfile

## Class FilterFileSystemProvider

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

- Direct Known Subclasses:
    DisableFsyncFS, ExtrasFS, HandleTrackingFS, ShuffleFS, VerboseFS, VirusCheckingFS

      public abstract class FilterFileSystemProvider
      extends FileSystemProvider

  A `FilterFileSystemProvider` contains another `FileSystemProvider`, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected FileSystemProvider` | `delegate` The underlying `FileSystemProvider`.
    `protected FileSystem` | `fileSystem` The underlying `FileSystem` instance.
    `protected String` | `scheme` The URI scheme for this provider.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterFileSystemProvider(String scheme, FileSystem delegateInstance)` Construct a `FilterFileSystemProvider` indicated by the specified `scheme` and wrapping functionality of the provider of the specified base filesystem.
    `FilterFileSystemProvider(String scheme, FileSystemProvider delegate)` Construct a `FilterFileSystemProvider` indicated by the specified `scheme` and wrapping functionality of the provider.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkAccess(Path path, AccessMode... modes)`
    `void` | `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` | `delete(Path path)`
    `boolean` | `deleteIfExists(Path path)`
    `<V extends FileAttributeView> V` | `getFileAttributeView(Path path, Class<V> type, LinkOption... options)`
    `FileStore` | `getFileStore(Path path)`
    `FileSystem` | `getFileSystem(URI uri)`
    `Path` | `getPath(URI uri)`
    `String` | `getScheme()`
    `boolean` | `isHidden(Path path)`
    `boolean` | `isSameFile(Path path, Path path2)`
    `void` | `move(Path source, Path target, CopyOption... options)`
    `AsynchronousFileChannel` | `newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs)`
    `SeekableByteChannel` | `newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)`
    `DirectoryStream<Path>` | `newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter)`
    `FileChannel` | `newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)`
    `FileSystem` | `newFileSystem(Path path, Map<String,?> env)`
    `FileSystem` | `newFileSystem(URI uri, Map<String,?> env)`
    `InputStream` | `newInputStream(Path path, OpenOption... options)`
    `OutputStream` | `newOutputStream(Path path, OpenOption... options)`
    `protected void` | `onClose()` Override to trigger some behavior when the filesystem is closed.
    `<A extends BasicFileAttributes> A` | `readAttributes(Path path, Class<A> type, LinkOption... options)`
    `Map<String,Object>` | `readAttributes(Path path, String attributes, LinkOption... options)`
    `Path` | `readSymbolicLink(Path link)`
    `void` | `setAttribute(Path path, String attribute, Object value, LinkOption... options)`
    `protected Path` | `toDelegate(Path path)`
    `String` | `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`

- - ### Field Detail

    - #### delegate

          protected final FileSystemProvider delegate

      The underlying `FileSystemProvider`.

    - #### fileSystem

          protected FileSystem fileSystem

      The underlying `FileSystem` instance.

    - #### scheme

          protected final String scheme

      The URI scheme for this provider.

  - ### Constructor Detail

    - #### FilterFileSystemProvider

          public FilterFileSystemProvider(String scheme,
                                          FileSystem delegateInstance)

      Construct a `FilterFileSystemProvider` indicated by the specified `scheme` and wrapping functionality of the provider of the specified base filesystem.
      Parameters:
        `scheme` - URI scheme
        `delegateInstance` - specified base filesystem.

    - #### FilterFileSystemProvider

          public FilterFileSystemProvider(String scheme,
                                          FileSystemProvider delegate)

      Construct a `FilterFileSystemProvider` indicated by the specified `scheme` and wrapping functionality of the provider. You must set the singleton `filesystem` yourself.
      Parameters:
        `scheme` - URI scheme
        `delegate` - specified base provider.

  - ### Method Detail

    - #### getScheme

          public String getScheme()

      Specified by:
        `getScheme` in class `FileSystemProvider`

    - #### newFileSystem

          public FileSystem newFileSystem(URI uri,
                                          Map<String,?> env)
                                   throws IOException

      Specified by:
        `newFileSystem` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newFileSystem

          public FileSystem newFileSystem(Path path,
                                          Map<String,?> env)
                                   throws IOException

      Overrides:
        `newFileSystem` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### getFileSystem

          public FileSystem getFileSystem(URI uri)

      Specified by:
        `getFileSystem` in class `FileSystemProvider`

    - #### getPath

          public Path getPath(URI uri)

      Specified by:
        `getPath` in class `FileSystemProvider`

    - #### createDirectory

          public void createDirectory(Path dir,
                                      FileAttribute<?>... attrs)
                               throws IOException

      Specified by:
        `createDirectory` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### delete

          public void delete(Path path)
                      throws IOException

      Specified by:
        `delete` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### copy

          public void copy(Path source,
                           Path target,
                           CopyOption... options)
                    throws IOException

      Specified by:
        `copy` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### move

          public void move(Path source,
                           Path target,
                           CopyOption... options)
                    throws IOException

      Specified by:
        `move` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### isSameFile

          public boolean isSameFile(Path path,
                                    Path path2)
                             throws IOException

      Specified by:
        `isSameFile` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### isHidden

          public boolean isHidden(Path path)
                           throws IOException

      Specified by:
        `isHidden` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### getFileStore

          public FileStore getFileStore(Path path)
                                 throws IOException

      Specified by:
        `getFileStore` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### checkAccess

          public void checkAccess(Path path,
                                  AccessMode... modes)
                           throws IOException

      Specified by:
        `checkAccess` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### getFileAttributeView

          public <V extends FileAttributeView> V getFileAttributeView(Path path,
                                                                      Class<V> type,
                                                                      LinkOption... options)

      Specified by:
        `getFileAttributeView` in class `FileSystemProvider`

    - #### readAttributes

          public <A extends BasicFileAttributes> A readAttributes(Path path,
                                                                  Class<A> type,
                                                                  LinkOption... options)
                                                           throws IOException

      Specified by:
        `readAttributes` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### readAttributes

          public Map<String,Object> readAttributes(Path path,
                                                   String attributes,
                                                   LinkOption... options)
                                            throws IOException

      Specified by:
        `readAttributes` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### setAttribute

          public void setAttribute(Path path,
                                   String attribute,
                                   Object value,
                                   LinkOption... options)
                            throws IOException

      Specified by:
        `setAttribute` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newInputStream

          public InputStream newInputStream(Path path,
                                            OpenOption... options)
                                     throws IOException

      Overrides:
        `newInputStream` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newOutputStream

          public OutputStream newOutputStream(Path path,
                                              OpenOption... options)
                                       throws IOException

      Overrides:
        `newOutputStream` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newFileChannel

          public FileChannel newFileChannel(Path path,
                                            Set<? extends OpenOption> options,
                                            FileAttribute<?>... attrs)
                                     throws IOException

      Overrides:
        `newFileChannel` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newAsynchronousFileChannel

          public AsynchronousFileChannel newAsynchronousFileChannel(Path path,
                                                                    Set<? extends OpenOption> options,
                                                                    ExecutorService executor,
                                                                    FileAttribute<?>... attrs)
                                                             throws IOException

      Overrides:
        `newAsynchronousFileChannel` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newByteChannel

          public SeekableByteChannel newByteChannel(Path path,
                                                    Set<? extends OpenOption> options,
                                                    FileAttribute<?>... attrs)
                                             throws IOException

      Specified by:
        `newByteChannel` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### newDirectoryStream

          public DirectoryStream<Path> newDirectoryStream(Path dir,
                                                          DirectoryStream.Filter<? super Path> filter)
                                                   throws IOException

      Specified by:
        `newDirectoryStream` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### createSymbolicLink

          public void createSymbolicLink(Path link,
                                         Path target,
                                         FileAttribute<?>... attrs)
                                  throws IOException

      Overrides:
        `createSymbolicLink` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### createLink

          public void createLink(Path link,
                                 Path existing)
                          throws IOException

      Overrides:
        `createLink` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### deleteIfExists

          public boolean deleteIfExists(Path path)
                                 throws IOException

      Overrides:
        `deleteIfExists` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### readSymbolicLink

          public Path readSymbolicLink(Path link)
                                throws IOException

      Overrides:
        `readSymbolicLink` in class `FileSystemProvider`
      Throws:
        `IOException`

    - #### toDelegate

          protected Path toDelegate(Path path)

    - #### onClose

          protected void onClose()

      Override to trigger some behavior when the filesystem is closed.

      This is always called for each FilterFileSystemProvider in the chain.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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