The Directory type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() | ClearLock | Attempt to clear (forcefully unlock and remove) the
specified lock. Only call this at a time when you are
certain this lock is no longer in use.
|
![]() | Close | Closes the store. |
![]() ![]() | Copy | Copy contents of a directory src to a directory dest.
If a file in src already exists in dest then the
one in dest will be blindly overwritten.
NOTE: the source directory cannot change
while this method is running. Otherwise the results
are undefined and you could easily hit a
FileNotFoundException.
NOTE: this method only copies files that look
like index files (ie, have extensions matching the
known extensions of index files).
|
![]() | CreateOutput | Creates a new, empty file in the directory with the given name.
Returns a stream writing this file.
|
![]() | DeleteFile | Removes an existing file in the directory. |
![]() | Dispose | |
![]() | EnsureOpen | |
![]() | Equals | (Inherited from Object.) |
![]() | FileExists | Returns true iff a file with the given name exists. |
![]() | FileLength | Returns the length of a file in the directory. |
![]() | FileModified | Returns the time the named file was last modified. |
![]() | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLockFactory | Get the LockFactory that this Directory instance is
using for its locking implementation. Note that this
may be null for Directory implementations that provide
their own locking implementation.
|
![]() | GetLockID | Return a string identifier that uniquely differentiates
this Directory instance from other Directory instances.
This ID should be the same if two Directory instances
(even in different JVMs and/or on different machines)
are considered "the same index". This is how locking
"scopes" to the right index.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | List | Obsolete. |
![]() | ListAll | Returns an array of strings, one for each file in the
directory. Unlike {@link #list} this method does no
filtering of the contents in a directory, and it will
never return null (throws IOException instead).
Currently this method simply fallsback to {@link
#list} for Directory impls outside of Lucene's core &
contrib, but in 3.0 that method will be removed and
this method will become abstract.
|
![]() | MakeLock | Construct a {@link Lock}. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OpenInput(String) | Returns a stream reading an existing file. |
![]() | OpenInput(String, Int32) | Returns a stream reading an existing file, with the
specified read buffer size. The particular Directory
implementation may ignore the buffer size. Currently
the only Directory implementations that respect this
parameter are {@link FSDirectory} and {@link
Lucene.Net.Index.CompoundFileReader}.
|
![]() | RenameFile | Obsolete. Renames an existing file in the directory.
If a file already exists with the new name, then it is replaced.
This replacement is not guaranteed to be atomic.
|
![]() | SetLockFactory | Set the LockFactory that this Directory instance should
use for its locking implementation. Each * instance of
LockFactory should only be used for one directory (ie,
do not share a single instance across multiple
Directories).
|
![]() | Sync | Ensure that any writes to this file are moved to
stable storage. Lucene uses this to properly commit
changes to the index, to prevent a machine/OS crash
from corrupting the index.
|
![]() | ToString | (Overrides Object..::..ToString()()()().) |
![]() | TouchFile | Set the modified time of an existing file to now. |