The FSDirectory type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FSDirectory()()()() | Obsolete. Initializes a new instance of the FSDirectory class | |
FSDirectory(DirectoryInfo, LockFactory) | Create a new FSDirectory for the named location (ctor for subclasses). |
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.
(Inherited from Directory.) | |
Close | Closes the store to future operations. (Overrides Directory..::..Close()()()().) | |
CreateOutput | Creates an IndexOutput for the file with the given name.
In 3.0 this method will become abstract. (Overrides Directory..::..CreateOutput(String).) | |
DeleteFile | Removes an existing file in the directory. (Overrides Directory..::..DeleteFile(String).) | |
Dispose |
.NET
(Overrides Directory..::..Dispose()()()().) | |
EnsureOpen | (Inherited from Directory.) | |
Equals | (Inherited from Object.) | |
FileExists | Returns true iff a file with the given name exists. (Overrides Directory..::..FileExists(String).) | |
FileLength | Returns the length in bytes of a file in the directory. (Overrides Directory..::..FileLength(String).) | |
FileModified(String) | Returns the time the named file was last modified. (Overrides Directory..::..FileModified(String).) | |
FileModified(FileInfo, String) | 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.) | |
GetDirectory()()()() | ||
GetDirectory(DirectoryInfo) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(FileInfo) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(String) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(DirectoryInfo, LockFactory) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(DirectoryInfo, Boolean) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(FileInfo, LockFactory) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(FileInfo, Boolean) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(String, LockFactory) | Obsolete. Returns the directory instance for the named location.
| |
GetDirectory(String, Boolean) | Obsolete. Returns the directory instance for the named location.
| |
GetDisableLocks | Obsolete. Returns whether Lucene's use of lock files is disabled. | |
GetFile | Obsolete. | |
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.
(Inherited from Directory.) | |
GetLockID | (Overrides Directory..::..GetLockID()()()().) | |
GetReadChunkSize | The maximum number of bytes to read at once from the
underlying file during {@link IndexInput#readBytes}.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InitOutput | Initializes the directory to create a new file with the given name.
This method should be used in {@link #createOutput}.
| |
List | Obsolete. (Overrides Directory..::..List()()()().) | |
ListAll()()()() | Lists all files (not subdirectories) in the
directory.
(Overrides Directory..::..ListAll()()()().) | |
ListAll(DirectoryInfo) | Lists all files (not subdirectories) in the
directory. This method never returns null (throws
{@link IOException} instead).
| |
ListAll(FileInfo) | Obsolete. Lists all files (not subdirectories) in the
directory. This method never returns null (throws
{@link IOException} instead).
| |
MakeLock | Construct a {@link Lock}. (Inherited from Directory.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Open(DirectoryInfo) | Creates an FSDirectory instance, trying to pick the
best implementation given the current environment.
The directory returned uses the {@link NativeFSLockFactory}.
Currently this returns {@link SimpleFSDirectory} as
NIOFSDirectory is currently not supported.
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 {@link MMapDirectory}, but this is disabled
because of officially missing unmap support in Java.
For optimal performance you should consider using
this implementation on 64 bit JVMs.
See above | |
Open(FileInfo) | Obsolete. Creates an FSDirectory instance, trying to pick the
best implementation given the current environment.
The directory returned uses the {@link NativeFSLockFactory}.
Currently this returns {@link SimpleFSDirectory} as
NIOFSDirectory is currently not supported.
Currently this returns {@link SimpleFSDirectory} as
NIOFSDirectory is currently not supported.
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 {@link MMapDirectory}, but this is disabled
because of officially missing unmap support in Java.
For optimal performance you should consider using
this implementation on 64 bit JVMs.
See above | |
Open(DirectoryInfo, LockFactory) | Just like {@link #Open(File)}, but allows you to
also specify a custom {@link LockFactory}.
| |
OpenInput(String) | (Overrides Directory..::..OpenInput(String).) | |
OpenInput(String, Int32) | Creates an IndexInput for the file with the given name.
In 3.0 this method will become abstract. (Overrides Directory..::..OpenInput(String, Int32).) | |
RenameFile | Obsolete. Renames an existing file in the directory.
Warning: This is not atomic.
(Overrides Directory..::..RenameFile(String, String).) | |
SetDisableLocks | Obsolete. Set whether Lucene's use of lock files is disabled. By default,
lock files are enabled. They should only be disabled if the index
is on a read-only medium like a CD-ROM.
| |
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).
(Inherited from Directory.) | |
SetReadChunkSize | Sets the maximum number of bytes read at once from the
underlying file during {@link IndexInput#readBytes}.
The default value is {@link #DEFAULT_READ_CHUNK_SIZE};
This was introduced due to Sun
JVM Bug 6478546, which throws an incorrect
OutOfMemoryError when attempting to read too many bytes
at once. It only happens on 32bit JVMs with a large
maximum heap size.Changes to this value will not impact any
already-opened {@link IndexInput}s. You should call
this before attempting to open an index on the
directory.NOTE: This value should be as large as
possible to reduce any possible performance impact. If
you still encounter an incorrect OutOfMemoryError,
trying lowering the chunk size. | |
Sync | (Overrides Directory..::..Sync(String).) | |
ToString | For debug output. (Overrides Directory..::..ToString()()()().) | |
TouchFile | Set the modified time of an existing file to now. (Overrides Directory..::..TouchFile(String).) |
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 CopyC# Integer.MAX_VALUE | |
directory | The underlying filesystem directory | |
isOpen | (Inherited from Directory.) | |
lockFactory | Holds the LockFactory instance (implements locking for
this Directory instance).
(Inherited from Directory.) |
Properties
Name | Description | |
---|---|---|
isOpen_ForNUnit | (Inherited from Directory.) |