org.apache.lucene.mockfile

## Class ExtrasFS

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

-     public class ExtrasFS
      extends FilterFileSystemProvider

  Adds extra files/subdirectories when directories are created.

  Lucene shouldn't care about these, but sometimes operating systems create special files themselves (.DS_Store, thumbs.db, .nfsXXX, ...), so we add them and see what breaks.

  When a directory is created, sometimes a file or directory named "extra0" will be included with it. All other filesystem operations are passed thru as normal.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.mockfile.FilterFileSystemProvider

      `delegate, fileSystem, scheme`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtrasFS(FileSystem delegate, boolean active, boolean createDirectory)` Create a new instance, wrapping `delegate`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createDirectory(Path dir, FileAttribute<?>... attrs)`

    - ### Methods inherited from class org.apache.lucene.mockfile.FilterFileSystemProvider

      `checkAccess, copy, createLink, createSymbolicLink, delete, 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

    - #### ExtrasFS

          public ExtrasFS(FileSystem delegate,
                          boolean active,
                          boolean createDirectory)

      Create a new instance, wrapping `delegate`.
      Parameters:
        `active` - `true` if we should create extra files
        `createDirectory` - `true` if we should create directories instead of files. Ignored if `active` is `false`.

  - ### Method Detail

    - #### createDirectory

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

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

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