blob: 72263b66b21f17ee54caa2188fa6073ff8212ce0 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class FSDirectory
| Apache Lucene.NET 4.8.0-beta00013 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class FSDirectory
| Apache Lucene.NET 4.8.0-beta00013 Documentation ">
<meta name="generator" content="docfx 2.56.2.0">
<link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="core/toc.html">
<meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<span id="forkongithub"><a href="https://github.com/apache/lucenenet" target="_blank">Fork me on GitHub</a></span>
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search">
<ul class="level0 breadcrumb">
<li>
<a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a>
<span id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</span>
</li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Store.FSDirectory">
<h1 id="Lucene_Net_Store_FSDirectory" data-uid="Lucene.Net.Store.FSDirectory" class="text-break">Class FSDirectory
</h1>
<div class="markdown level0 summary"><p>Base class for <a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Directory">Directory</a> implementations that store index
files in the file system.
<p>
There are currently three core
subclasses:</p>
<ul><li> <a class="xref" href="Lucene.Net.Store.SimpleFSDirectory.html">SimpleFSDirectory</a> is a straightforward
implementation using <span class="xref">System.IO.FileStream</span>.
However, it has poor concurrent performance
(multiple threads will bottleneck) as it
synchronizes when multiple threads read from the
same file.</li><li> <a class="xref" href="Lucene.Net.Store.NIOFSDirectory.html">NIOFSDirectory</a> uses java.nio&apos;s
FileChannel&apos;s positional io when reading to avoid
synchronization when reading from the same file.
Unfortunately, due to a Windows-only <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6265734">Sun
JRE bug</a> this is a poor choice for Windows, but
on all other platforms this is the preferred
choice. Applications using <span class="xref">System.Threading.Thread.Interrupt</span> or
<span class="xref">System.Threading.Tasks.Task`1</span> should use
<a class="xref" href="Lucene.Net.Store.SimpleFSDirectory.html">SimpleFSDirectory</a> instead. See <a class="xref" href="Lucene.Net.Store.NIOFSDirectory.html">NIOFSDirectory</a> java doc
for details.</li><li> <a class="xref" href="Lucene.Net.Store.MMapDirectory.html">MMapDirectory</a> uses memory-mapped IO when
reading. This is a good choice if you have plenty
of virtual memory relative to your index size, eg
if you are running on a 64 bit runtime, or you are
running on a 32 bit runtime but your index sizes are
small enough to fit into the virtual memory space.
<p>
Applications using <span class="xref">System.Threading.Thread.Interrupt</span> or
<span class="xref">System.Threading.Tasks.Task`1</span> should use
<a class="xref" href="Lucene.Net.Store.SimpleFSDirectory.html">SimpleFSDirectory</a> instead. See <a class="xref" href="Lucene.Net.Store.MMapDirectory.html">MMapDirectory</a>
doc for details.</li></ul>
<p>Unfortunately, because of system peculiarities, there is
no single overall best implementation. Therefore, we&apos;ve
added the <a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Open_System_String_">Open(String)</a> method (or one of its overloads), to allow Lucene to choose
the best <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a> implementation given your
environment, and the known limitations of each
implementation. For users who have no reason to prefer a
specific implementation, it&apos;s best to simply use
<a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Open_System_String_">Open(String)</a> (or one of its overloads). For all others, you should instantiate the
desired implementation directly.</p>
<p><p>The locking implementation is by default
<a class="xref" href="Lucene.Net.Store.NativeFSLockFactory.html">NativeFSLockFactory</a>, but can be changed by
passing in a custom <a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a> instance.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a></div>
<div class="level2"><a class="xref" href="Lucene.Net.Store.BaseDirectory.html">BaseDirectory</a></div>
<div class="level3"><span class="xref">FSDirectory</span></div>
<div class="level4"><a class="xref" href="Lucene.Net.Store.MMapDirectory.html">MMapDirectory</a></div>
<div class="level4"><a class="xref" href="Lucene.Net.Store.NIOFSDirectory.html">NIOFSDirectory</a></div>
<div class="level4"><a class="xref" href="Lucene.Net.Store.SimpleFSDirectory.html">SimpleFSDirectory</a></div>
</div>
<div classs="implements">
<h5>Implements</h5>
<div><span class="xref">System.IDisposable</span></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_IsOpen">BaseDirectory.IsOpen</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_m_lockFactory">BaseDirectory.m_lockFactory</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_MakeLock_System_String_">BaseDirectory.MakeLock(String)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_ClearLock_System_String_">BaseDirectory.ClearLock(String)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_LockFactory">BaseDirectory.LockFactory</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_EnsureOpen">BaseDirectory.EnsureOpen()</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_OpenInput_System_String_Lucene_Net_Store_IOContext_">Directory.OpenInput(String, IOContext)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_OpenChecksumInput_System_String_Lucene_Net_Store_IOContext_">Directory.OpenChecksumInput(String, IOContext)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_Dispose">Directory.Dispose()</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_Copy_Lucene_Net_Store_Directory_System_String_System_String_Lucene_Net_Store_IOContext_">Directory.Copy(Directory, String, String, IOContext)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_CreateSlicer_System_String_Lucene_Net_Store_IOContext_">Directory.CreateSlicer(String, IOContext)</a>
</div>
<div>
<span class="xref">System.Object.Equals(System.Object)</span>
</div>
<div>
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.GetHashCode()</span>
</div>
<div>
<span class="xref">System.Object.GetType()</span>
</div>
<div>
<span class="xref">System.Object.MemberwiseClone()</span>
</div>
<div>
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Store.html">Lucene.Net.Store</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Store_FSDirectory_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract class FSDirectory : BaseDirectory, IDisposable</code></pre>
</div>
<h3 id="constructors">Constructors
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory__ctor_System_IO_DirectoryInfo_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.%23ctor(System.IO.DirectoryInfo)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L108">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory__ctor_" data-uid="Lucene.Net.Store.FSDirectory.#ctor*"></a>
<h4 id="Lucene_Net_Store_FSDirectory__ctor_System_IO_DirectoryInfo_" data-uid="Lucene.Net.Store.FSDirectory.#ctor(System.IO.DirectoryInfo)">FSDirectory(DirectoryInfo)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected FSDirectory(DirectoryInfo dir)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td><span class="parametername">dir</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory__ctor_System_IO_DirectoryInfo_Lucene_Net_Store_LockFactory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.%23ctor(System.IO.DirectoryInfo%2CLucene.Net.Store.LockFactory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L119">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory__ctor_" data-uid="Lucene.Net.Store.FSDirectory.#ctor*"></a>
<h4 id="Lucene_Net_Store_FSDirectory__ctor_System_IO_DirectoryInfo_Lucene_Net_Store_LockFactory_" data-uid="Lucene.Net.Store.FSDirectory.#ctor(System.IO.DirectoryInfo,Lucene.Net.Store.LockFactory)">FSDirectory(DirectoryInfo, LockFactory)</h4>
<div class="markdown level1 summary"><p>Create a new <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a> for the named location (ctor for subclasses). </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected FSDirectory(DirectoryInfo path, LockFactory lockFactory)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td><span class="parametername">path</span></td>
<td><p>the path of the directory </p>
</td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a></td>
<td><span class="parametername">lockFactory</span></td>
<td><p>the lock factory to use, or null for the default
(<a class="xref" href="Lucene.Net.Store.NativeFSLockFactory.html">NativeFSLockFactory</a>); </p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.IOException</span></td>
<td><p>if there is a low-level I/O error </p>
</td>
</tr>
</tbody>
</table>
<h3 id="fields">Fields
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_DEFAULT_READ_CHUNK_SIZE.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.DEFAULT_READ_CHUNK_SIZE%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L97">View Source</a>
</span>
<h4 id="Lucene_Net_Store_FSDirectory_DEFAULT_READ_CHUNK_SIZE" data-uid="Lucene.Net.Store.FSDirectory.DEFAULT_READ_CHUNK_SIZE">DEFAULT_READ_CHUNK_SIZE</h4>
<div class="markdown level1 summary"><p>Default read chunk size: 8192 bytes (this is the size up to which the runtime
does not allocate additional arrays while reading/writing) </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[Obsolete(&quot;this constant is no longer used since Lucene 4.5.&quot;)]
public const int DEFAULT_READ_CHUNK_SIZE = 8192</code></pre>
</div>
<h5 class="fieldValue">Field Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_m_directory.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.m_directory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L99">View Source</a>
</span>
<h4 id="Lucene_Net_Store_FSDirectory_m_directory" data-uid="Lucene.Net.Store.FSDirectory.m_directory">m_directory</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected readonly DirectoryInfo m_directory</code></pre>
</div>
<h5 class="fieldValue">Field Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Directory.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Directory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L436">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Directory_" data-uid="Lucene.Net.Store.FSDirectory.Directory*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Directory" data-uid="Lucene.Net.Store.FSDirectory.Directory">Directory</h4>
<div class="markdown level1 summary"><p>the underlying filesystem directory </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual DirectoryInfo Directory { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_ReadChunkSize.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.ReadChunkSize%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L454">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_ReadChunkSize_" data-uid="Lucene.Net.Store.FSDirectory.ReadChunkSize*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_ReadChunkSize" data-uid="Lucene.Net.Store.FSDirectory.ReadChunkSize">ReadChunkSize</h4>
<div class="markdown level1 summary"><p>this setting has no effect anymore. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[Obsolete(&quot;this is no longer used since Lucene 4.5.&quot;)]
public int ReadChunkSize { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_CreateOutput_System_String_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.CreateOutput(System.String%2CLucene.Net.Store.IOContext)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L334">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_CreateOutput_" data-uid="Lucene.Net.Store.FSDirectory.CreateOutput*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_CreateOutput_System_String_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Store.FSDirectory.CreateOutput(System.String,Lucene.Net.Store.IOContext)">CreateOutput(String, IOContext)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="Lucene.Net.Store.IndexOutput.html">IndexOutput</a> for the file with the given name. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override IndexOutput CreateOutput(string name, IOContext context)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Store.IOContext.html">IOContext</a></td>
<td><span class="parametername">context</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.IndexOutput.html">IndexOutput</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_CreateOutput_System_String_Lucene_Net_Store_IOContext_">Directory.CreateOutput(String, IOContext)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_DeleteFile_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.DeleteFile(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L304">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_DeleteFile_" data-uid="Lucene.Net.Store.FSDirectory.DeleteFile*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_DeleteFile_System_String_" data-uid="Lucene.Net.Store.FSDirectory.DeleteFile(System.String)">DeleteFile(String)</h4>
<div class="markdown level1 summary"><p>Removes an existing file in the directory. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override void DeleteFile(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_DeleteFile_System_String_">Directory.DeleteFile(String)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Dispose(System.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L427">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Dispose_" data-uid="Lucene.Net.Store.FSDirectory.Dispose*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Dispose_System_Boolean_" data-uid="Lucene.Net.Store.FSDirectory.Dispose(System.Boolean)">Dispose(Boolean)</h4>
<div class="markdown level1 summary"><p>Closes the store to future operations. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected override void Dispose(bool disposing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">disposing</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_Dispose_System_Boolean_">Directory.Dispose(Boolean)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_EnsureCanWrite_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.EnsureCanWrite(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L342">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_EnsureCanWrite_" data-uid="Lucene.Net.Store.FSDirectory.EnsureCanWrite*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_EnsureCanWrite_System_String_" data-uid="Lucene.Net.Store.FSDirectory.EnsureCanWrite(System.String)">EnsureCanWrite(String)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual void EnsureCanWrite(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_FileExists_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.FileExists(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L278">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_FileExists_" data-uid="Lucene.Net.Store.FSDirectory.FileExists*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_FileExists_System_String_" data-uid="Lucene.Net.Store.FSDirectory.FileExists(System.String)">FileExists(String)</h4>
<div class="markdown level1 summary"><p>Returns true iff a file with the given name exists. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[Obsolete(&quot;this method will be removed in 5.0&quot;)]
public override bool FileExists(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_FileExists_System_String_">Directory.FileExists(String)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_FileLength_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.FileLength(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L287">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_FileLength_" data-uid="Lucene.Net.Store.FSDirectory.FileLength*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_FileLength_System_String_" data-uid="Lucene.Net.Store.FSDirectory.FileLength(System.String)">FileLength(String)</h4>
<div class="markdown level1 summary"><p>Returns the length in bytes of a file in the directory. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override long FileLength(string name)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int64</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_FileLength_System_String_">Directory.FileLength(String)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_GetLockID.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.GetLockID%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L403">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_GetLockID_" data-uid="Lucene.Net.Store.FSDirectory.GetLockID*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_GetLockID" data-uid="Lucene.Net.Store.FSDirectory.GetLockID">GetLockID()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string GetLockID()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_GetLockID">Directory.GetLockID()</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_ListAll.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.ListAll%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L270">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_ListAll_" data-uid="Lucene.Net.Store.FSDirectory.ListAll*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_ListAll" data-uid="Lucene.Net.Store.FSDirectory.ListAll">ListAll()</h4>
<div class="markdown level1 summary"><p>Lists all files (not subdirectories) in the
directory. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string[] ListAll()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span>[]</td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_ListAll">Directory.ListAll()</a></div>
<h5 id="Lucene_Net_Store_FSDirectory_ListAll_seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_ListAll_System_IO_DirectoryInfo_">ListAll(DirectoryInfo)</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_ListAll_System_IO_DirectoryInfo_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.ListAll(System.IO.DirectoryInfo)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L238">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_ListAll_" data-uid="Lucene.Net.Store.FSDirectory.ListAll*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_ListAll_System_IO_DirectoryInfo_" data-uid="Lucene.Net.Store.FSDirectory.ListAll(System.IO.DirectoryInfo)">ListAll(DirectoryInfo)</h4>
<div class="markdown level1 summary"><p>Lists all files (not subdirectories) in the
directory. This method never returns <code>null</code> (throws
<span class="xref">System.IO.IOException</span> instead).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string[] ListAll(DirectoryInfo dir)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td><span class="parametername">dir</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span>[]</td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryNotFoundException</span></td>
<td><p>if the directory
does not exist, or does exist but is not a
directory or is invalid (for example, it is on an unmapped drive). </p>
</td>
</tr>
<tr>
<td><span class="xref">System.Security.SecurityException</span></td>
<td><p>The caller does not have the required permission.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_OnIndexOutputClosed_Lucene_Net_Store_FSDirectory_FSIndexOutput_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.OnIndexOutputClosed(Lucene.Net.Store.FSDirectory.FSIndexOutput)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L370">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_OnIndexOutputClosed_" data-uid="Lucene.Net.Store.FSDirectory.OnIndexOutputClosed*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_OnIndexOutputClosed_Lucene_Net_Store_FSDirectory_FSIndexOutput_" data-uid="Lucene.Net.Store.FSDirectory.OnIndexOutputClosed(Lucene.Net.Store.FSDirectory.FSIndexOutput)">OnIndexOutputClosed(FSDirectory.FSIndexOutput)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual void OnIndexOutputClosed(FSDirectory.FSIndexOutput io)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.FSDirectory.FSIndexOutput.html">FSDirectory.FSIndexOutput</a></td>
<td><span class="parametername">io</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Open(System.IO.DirectoryInfo)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L158">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Open_" data-uid="Lucene.Net.Store.FSDirectory.Open*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_" data-uid="Lucene.Net.Store.FSDirectory.Open(System.IO.DirectoryInfo)">Open(DirectoryInfo)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a> instance, trying to pick the
best implementation given the current environment.
The directory returned uses the <a class="xref" href="Lucene.Net.Store.NativeFSLockFactory.html">NativeFSLockFactory</a>.</p>
<p><p>Currently this returns <a class="xref" href="Lucene.Net.Store.MMapDirectory.html">MMapDirectory</a> for most Solaris
and Windows 64-bit runtimes, <a class="xref" href="Lucene.Net.Store.NIOFSDirectory.html">NIOFSDirectory</a> for other
non-Windows runtimes, and <a class="xref" href="Lucene.Net.Store.SimpleFSDirectory.html">SimpleFSDirectory</a> for other
runtimes on Windows. It is highly recommended that you consult the
implementation&apos;s documentation for your platform before
using this method.</p>
<p><p><strong>NOTE</strong>: 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. For optimal performance you should consider using
<a class="xref" href="Lucene.Net.Store.MMapDirectory.html">MMapDirectory</a> on 64 bit runtimes.</p>
<p><p>See <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FSDirectory Open(DirectoryInfo path)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td><span class="parametername">path</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_Lucene_Net_Store_LockFactory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Open(System.IO.DirectoryInfo%2CLucene.Net.Store.LockFactory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L178">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Open_" data-uid="Lucene.Net.Store.FSDirectory.Open*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_Lucene_Net_Store_LockFactory_" data-uid="Lucene.Net.Store.FSDirectory.Open(System.IO.DirectoryInfo,Lucene.Net.Store.LockFactory)">Open(DirectoryInfo, LockFactory)</h4>
<div class="markdown level1 summary"><p>Just like <a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_">Open(DirectoryInfo)</a>, but allows you to
also specify a custom <a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FSDirectory Open(DirectoryInfo path, LockFactory lockFactory)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IO.DirectoryInfo</span></td>
<td><span class="parametername">path</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a></td>
<td><span class="parametername">lockFactory</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Open_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Open(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L169">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Open_" data-uid="Lucene.Net.Store.FSDirectory.Open*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Open_System_String_" data-uid="Lucene.Net.Store.FSDirectory.Open(System.String)">Open(String)</h4>
<div class="markdown level1 summary"><p>Just like <a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_">Open(DirectoryInfo)</a>, but
allows you to specify the directory as a <span class="xref">System.String</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FSDirectory Open(string path)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">path</span></td>
<td><p>The path (to a directory) to open</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a></td>
<td><p>An open <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a></p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Open_System_String_Lucene_Net_Store_LockFactory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Open(System.String%2CLucene.Net.Store.LockFactory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L202">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Open_" data-uid="Lucene.Net.Store.FSDirectory.Open*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Open_System_String_Lucene_Net_Store_LockFactory_" data-uid="Lucene.Net.Store.FSDirectory.Open(System.String,Lucene.Net.Store.LockFactory)">Open(String, LockFactory)</h4>
<div class="markdown level1 summary"><p>Just like <a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Open_System_IO_DirectoryInfo_Lucene_Net_Store_LockFactory_">Open(DirectoryInfo, LockFactory)</a>, but
allows you to specify the directory as a <span class="xref">System.String</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FSDirectory Open(string path, LockFactory lockFactory)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">path</span></td>
<td><p>The path (to a directory) to open</p>
</td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a></td>
<td><span class="parametername">lockFactory</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a></td>
<td><p>An open <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a></p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_SetLockFactory_Lucene_Net_Store_LockFactory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.SetLockFactory(Lucene.Net.Store.LockFactory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L207">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_SetLockFactory_" data-uid="Lucene.Net.Store.FSDirectory.SetLockFactory*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_SetLockFactory_Lucene_Net_Store_LockFactory_" data-uid="Lucene.Net.Store.FSDirectory.SetLockFactory(Lucene.Net.Store.LockFactory)">SetLockFactory(LockFactory)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override void SetLockFactory(LockFactory lockFactory)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a></td>
<td><span class="parametername">lockFactory</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.BaseDirectory.html#Lucene_Net_Store_BaseDirectory_SetLockFactory_Lucene_Net_Store_LockFactory_">BaseDirectory.SetLockFactory(LockFactory)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_Sync_System_Collections_Generic_ICollection_System_String__.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.Sync(System.Collections.Generic.ICollection%7BSystem.String%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L377">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_Sync_" data-uid="Lucene.Net.Store.FSDirectory.Sync*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_Sync_System_Collections_Generic_ICollection_System_String__" data-uid="Lucene.Net.Store.FSDirectory.Sync(System.Collections.Generic.ICollection{System.String})">Sync(ICollection&lt;String&gt;)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override void Sync(ICollection&lt;string&gt; names)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.ICollection</span>&lt;<span class="xref">System.String</span>&gt;</td>
<td><span class="parametername">names</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_Sync_System_Collections_Generic_ICollection_System_String__">Directory.Sync(ICollection&lt;String&gt;)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory_ToString.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory.ToString%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L447">View Source</a>
</span>
<a id="Lucene_Net_Store_FSDirectory_ToString_" data-uid="Lucene.Net.Store.FSDirectory.ToString*"></a>
<h4 id="Lucene_Net_Store_FSDirectory_ToString" data-uid="Lucene.Net.Store.FSDirectory.ToString">ToString()</h4>
<div class="markdown level1 summary"><p>For debug output. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_ToString">Directory.ToString()</a></div>
<h3 id="implements">Implements</h3>
<div>
<span class="xref">System.IDisposable</span>
</div>
<h3 id="seealso">See Also</h3>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Store.FSDirectory.html#Lucene_Net_Store_FSDirectory_Directory">Directory</a></div>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00013/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_FSDirectory.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.FSDirectory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/apache/lucenenet/blob/fix/apidocs-layout/src/Lucene.Net/Store/FSDirectory.cs/#L91" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 The Apache Software Foundation, Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache License, Version 2.0</a><br> <small>Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. <br>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</small>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script>
</body>
</html>