Class NIOFSDirectory
An FSDirectory implementation that uses
This class only uses
NOTE: NIOFSDirectory is not recommended on Windows because of a bug in how FileChannel.read is implemented in Sun's JRE. Inside of the implementation the position is apparently synchronized. See here for details.
NOTE: Accessing this class either directly or
indirectly from a thread while it's interrupted can close the
underlying file descriptor immediately if at the same time the thread is
blocked on IO. The file descriptor will remain closed and subsequent access
to NIOFSDirectory will throw a
Inherited Members
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public class NIOFSDirectory : FSDirectory
Constructors
| Improve this Doc View SourceNIOFSDirectory(DirectoryInfo)
Create a new NIOFSDirectory for the named location and NativeFSLockFactory.
Declaration
public NIOFSDirectory(DirectoryInfo path)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | path | the path of the directory |
NIOFSDirectory(DirectoryInfo, LockFactory)
Create a new NIOFSDirectory for the named location.
Declaration
public NIOFSDirectory(DirectoryInfo path, LockFactory lockFactory)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | path | the path of the directory |
LockFactory | lockFactory | the lock factory to use, or null for the default (NativeFSLockFactory); |
NIOFSDirectory(String)
Create a new NIOFSDirectory for the named location and NativeFSLockFactory.
LUCENENET specific overload for convenience using string instead of
Declaration
public NIOFSDirectory(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | the path of the directory |
NIOFSDirectory(String, LockFactory)
Create a new NIOFSDirectory for the named location.
LUCENENET specific overload for convenience using string instead of
Declaration
public NIOFSDirectory(string path, LockFactory lockFactory)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | the path of the directory |
LockFactory | lockFactory | the lock factory to use, or null for the default (NativeFSLockFactory); |
Methods
| Improve this Doc View SourceCreateSlicer(String, IOContext)
Declaration
public override Directory.IndexInputSlicer CreateSlicer(string name, IOContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
IOContext | context |
Returns
Type | Description |
---|---|
Directory.IndexInputSlicer |
Overrides
| Improve this Doc View SourceOpenInput(String, IOContext)
Creates an IndexInput for the file with the given name.
Declaration
public override IndexInput OpenInput(string name, IOContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
IOContext | context |
Returns
Type | Description |
---|---|
IndexInput |