Class FSDirectory
Base class for Directory implementations that store index files in the file system. There are currently three core subclasses:
Unfortunately, because of system peculiarities, there is
no single overall best implementation. Therefore, we've
added the Open(IO.
The locking implementation is by default Native
Inherited Members
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public abstract class FSDirectory : Directory
Constructors
Name | Description |
---|---|
FSDirectory(IO. |
Create a new FSDirectory for the named location (ctor for subclasses). |
Fields
Name | Description |
---|---|
DEFAULT_READ_CHUNK_SIZE | Default read chunk size. This is a conditional
default: on 32bit JVMs, it defaults to 100 MB. On
64bit JVMs, it's |
internal |
The underlying filesystem directory |
Properties
Name | Description |
---|---|
Directory | |
Read |
The maximum number of bytes to read at once from the
underlying file during Read |
Methods
Name | Description |
---|---|
Delete |
Removes an existing file in the directory. |
Dispose(Boolean) | |
File |
Returns true iff a file with the given name exists. |
File |
Returns the length in bytes of a file in the directory. |
File |
Returns the time the named file was last modified. |
File |
Returns the time the named file was last modified. |
Get |
|
Init |
Initializes the directory to create a new file with the given name.
This method should be used in |
List |
Lists all files (not subdirectories) in the directory. |
List |
Lists all files (not subdirectories) in the
directory. This method never returns null (throws
|
Open(IO. |
Creates an FSDirectory instance, trying to pick the
best implementation given the current environment.
The directory returned uses the Native Currently this returns Simple NOTE: this method may suddenly change which
implementation is returned from release to release, in
the event that higher performance defaults become
possible; if the precise implementation is important to
your application, please instantiate it directly,
instead. On 64 bit systems, it may also good to
return MMap See above |
Open(IO. |
Just like Open(IO. |
Open(String) | Creates an FSDirectory instance, trying to pick the
best implementation given the current environment.
The directory returned uses the Native Currently this returns Simple NOTE: this method may suddenly change which
implementation is returned from release to release, in
the event that higher performance defaults become
possible; if the precise implementation is important to
your application, please instantiate it directly,
instead. On 64 bit systems, it may also good to
return MMap See above |
Open |
|
Sync(String) | |
To |
For debug output. |
Touch |
Set the modified time of an existing file to now. |