org.apache.lucene.mockfile

## Class FilterFileSystem

- java.lang.Object
- - java.nio.file.FileSystem
  - - org.apache.lucene.mockfile.FilterFileSystem

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class FilterFileSystem
      extends FileSystem

  A `FilterFileSystem` contains another `FileSystem`, 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 FileSystem` | `delegate` The underlying `FileSystem` instance.
    `protected FilterFileSystemProvider` | `parent` FileSystemProvider that created this FilterFileSystem

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterFileSystem(FilterFileSystemProvider parent, FileSystem delegate)` Construct a `FilterFileSystem` based on the specified base filesystem.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `FileSystem` | `getDelegate()` Returns the `FileSystem` we wrap.
    `Iterable<FileStore>` | `getFileStores()`
    `FileSystemProvider` | `getParent()` Returns the `FilterFileSystemProvider` sent to this on init.
    `Path` | `getPath(String first, String... more)`
    `PathMatcher` | `getPathMatcher(String syntaxAndPattern)`
    `Iterable<Path>` | `getRootDirectories()`
    `String` | `getSeparator()`
    `UserPrincipalLookupService` | `getUserPrincipalLookupService()`
    `boolean` | `isOpen()`
    `boolean` | `isReadOnly()`
    `WatchService` | `newWatchService()`
    `FileSystemProvider` | `provider()`
    `Set<String>` | `supportedFileAttributeViews()`

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

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

- - ### Field Detail

    - #### parent

          protected final FilterFileSystemProvider parent

      FileSystemProvider that created this FilterFileSystem

    - #### delegate

          protected final FileSystem delegate

      The underlying `FileSystem` instance.

  - ### Constructor Detail

    - #### FilterFileSystem

          public FilterFileSystem(FilterFileSystemProvider parent,
                                  FileSystem delegate)

      Construct a `FilterFileSystem` based on the specified base filesystem.

      Note that base filesystem is closed if this filesystem is closed, however the default filesystem provider will never be closed, it doesn't support that.

      Parameters:
        `delegate` - specified base channel.

  - ### Method Detail

    - #### provider

          public FileSystemProvider provider()

      Specified by:
        `provider` in class `FileSystem`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in class `FileSystem`
      Throws:
        `IOException`

    - #### isOpen

          public boolean isOpen()

      Specified by:
        `isOpen` in class `FileSystem`

    - #### isReadOnly

          public boolean isReadOnly()

      Specified by:
        `isReadOnly` in class `FileSystem`

    - #### getSeparator

          public String getSeparator()

      Specified by:
        `getSeparator` in class `FileSystem`

    - #### getRootDirectories

          public Iterable<Path> getRootDirectories()

      Specified by:
        `getRootDirectories` in class `FileSystem`

    - #### getFileStores

          public Iterable<FileStore> getFileStores()

      Specified by:
        `getFileStores` in class `FileSystem`

    - #### supportedFileAttributeViews

          public Set<String> supportedFileAttributeViews()

      Specified by:
        `supportedFileAttributeViews` in class `FileSystem`

    - #### getPath

          public Path getPath(String first,
                              String... more)

      Specified by:
        `getPath` in class `FileSystem`

    - #### getPathMatcher

          public PathMatcher getPathMatcher(String syntaxAndPattern)

      Specified by:
        `getPathMatcher` in class `FileSystem`

    - #### getUserPrincipalLookupService

          public UserPrincipalLookupService getUserPrincipalLookupService()

      Specified by:
        `getUserPrincipalLookupService` in class `FileSystem`

    - #### newWatchService

          public WatchService newWatchService()
                                       throws IOException

      Specified by:
        `newWatchService` in class `FileSystem`
      Throws:
        `IOException`

    - #### getDelegate

          public FileSystem getDelegate()

      Returns the `FileSystem` we wrap.

    - #### getParent

          public FileSystemProvider getParent()

      Returns the `FilterFileSystemProvider` sent to this on init.

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