ExtrasFS

class ExtrasFS(delegate: FileSystem, val active: Boolean, val createDirectory: Boolean) : 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 to check if it's one of those files).

All other filesystem operations are delegated as normal.

Constructors

Link copied to clipboard
constructor(delegate: FileSystem, active: Boolean, createDirectory: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun appendingSink(file: Path, mustExist: Boolean = false): Sink
Link copied to clipboard
open fun atomicMove(source: Path, target: Path)
Link copied to clipboard
open fun canonicalize(path: Path): Path
Link copied to clipboard
open override fun createDirectory(dir: Path, mustCreate: Boolean = false)
Link copied to clipboard
open fun delete(path: Path, mustExist: Boolean = true)
Link copied to clipboard
Link copied to clipboard
fun getPath(uri: String): Path
Link copied to clipboard
Link copied to clipboard
open fun list(dir: Path): List<Path>
Link copied to clipboard
open fun listOrNull(dir: Path): List<Path>?
Link copied to clipboard
open fun metadataOrNull(path: Path): FileMetadata?
Link copied to clipboard
open fun onClose()
Link copied to clipboard
open fun openReadOnly(file: Path): FileHandle
Link copied to clipboard
open fun openReadWrite(file: Path, mustCreate: Boolean = false, mustExist: Boolean = false): FileHandle
Link copied to clipboard
open fun sink(file: Path, mustCreate: Boolean = false): Sink
Link copied to clipboard
open fun source(file: Path): Source
Link copied to clipboard
open fun wrapPath(path: Path): Path

wraps a Path with provider-specific behavior