Class 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 an "extra" file or directory will be included with it (use isExtra(String) to check if it's one of those files).

    All other filesystem operations are delegated as normal.

    • Constructor Detail

      • ExtrasFS

        public ExtrasFS​(FileSystem delegate,
                        boolean active,
                        boolean createDirectory)
        Create a new instance, wrapping delegate.
        active - true if we should create extra files
        createDirectory - true if we should create directories instead of files. Ignored if active is false.