Method Open
Open(String)
Creates an FSDirectory instance, trying to pick the best implementation given the current environment. The directory returned uses the NativeFSLockFactory.
Currently this returns 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 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
Declaration
public static FSDirectory Open(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Returns
Type | Description |
---|---|
FSDirectory |
Open(IO.DirectoryInfo)
Creates an FSDirectory instance, trying to pick the best implementation given the current environment. The directory returned uses the NativeFSLockFactory.
Currently this returns 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 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
Declaration
public static FSDirectory Open(IO.DirectoryInfo path)
Parameters
Type | Name | Description |
---|---|---|
System.IO.DirectoryInfo | path |
Returns
Type | Description |
---|---|
FSDirectory |
Open(IO.DirectoryInfo, LockFactory)
Just like Open(IO.DirectoryInfo), but allows you to also specify a custom LockFactory.
Declaration
public static FSDirectory Open(IO.DirectoryInfo path, LockFactory lockFactory)
Parameters
Type | Name | Description |
---|---|---|
System.IO.DirectoryInfo | path | |
LockFactory | lockFactory |
Returns
Type | Description |
---|---|
FSDirectory |