Directory
A Directory provides an abstraction layer for storing a list of files. A directory contains only files (no sub-folder hierarchy).
Implementing classes must comply with the following:
A file in a directory can be created (.createOutput), appended to, then closed.
A file open for writing may not be available for read access until the corresponding [ ] is closed.
Once a file is created it must only be opened for input (.openInput), or deleted (.deleteFile). Calling .createOutput on an existing file must throw [ ].
NOTE: If your application requires external synchronization, you should not synchronize on the Directory implementation instance as this may cause deadlock; use your own (non-Lucene) objects instead.
See also
Inheritors
Functions
Creates a new, empty file in the directory and returns an IndexOutput instance for appending data to this file.
Creates a new, empty, temporary file in the directory and returns an IndexOutput instance for appending data to this file.
Removes an existing file in the directory.
Ensures this directory is still open.
Returns the byte length of a file in the directory.
Returns names of all files stored in this directory. The output must be in sorted (UTF-16, java's String.compareTo) order.
Acquires and returns a Lock for a file with the given name.
Opens a checksum-computing stream for reading an existing file.
Opens a stream for reading an existing file.
Ensures that any writes to these files are moved to stable storage (made durable).
Ensures that directory metadata, such as recent file renames, are moved to stable storage.