blob: f28c5b61dcafc663d792f4c82bca2c8b7bf44774 [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 Directory
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class Directory
| Apache Lucene.NET 4.8.0-beta00010 Documentation ">
<meta name="generator" content="docfx 2.56.0.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">
<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.Directory">
<h1 id="Lucene_Net_Store_Directory" data-uid="Lucene.Net.Store.Directory" class="text-break">Class Directory
</h1>
<div class="markdown level0 summary"><p>A <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> is a flat list of files. Files may be written once, when they
are created. Once a file is created it may only be opened for read, or
deleted. Random access is permitted both when reading and writing.
<p>
.NET&apos;s i/o APIs not used directly, but rather all i/o is
through this API. This permits things such as:
<ul><li> implementation of RAM-based indices;</li><li> implementation indices stored in a database;</li><li> implementation of an index as a single file;</li></ul>
<p>
Directory locking is implemented by an instance of
<a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a>, and can be changed for each <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a>
instance using <a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_SetLockFactory_Lucene_Net_Store_LockFactory_">SetLockFactory(LockFactory)</a>.</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"><span class="xref">Directory</span></div>
<div class="level2"><a class="xref" href="Lucene.Net.Store.BaseDirectory.html">BaseDirectory</a></div>
<div class="level2"><a class="xref" href="Lucene.Net.Store.FilterDirectory.html">FilterDirectory</a></div>
<div class="level2"><a class="xref" href="Lucene.Net.Store.NRTCachingDirectory.html">NRTCachingDirectory</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>
<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_Directory_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract class Directory : IDisposable</code></pre>
</div>
<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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_LockFactory.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L156">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_LockFactory_" data-uid="Lucene.Net.Store.Directory.LockFactory*"></a>
<h4 id="Lucene_Net_Store_Directory_LockFactory" data-uid="Lucene.Net.Store.Directory.LockFactory">LockFactory</h4>
<div class="markdown level1 summary"><p>Get the <a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a> that this <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> instance is
using for its locking implementation. Note that this
may be null for <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> implementations that provide
their own locking implementation.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract LockFactory LockFactory { 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><a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a></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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_ClearLock_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.ClearLock(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L125">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_ClearLock_" data-uid="Lucene.Net.Store.Directory.ClearLock*"></a>
<h4 id="Lucene_Net_Store_Directory_ClearLock_System_String_" data-uid="Lucene.Net.Store.Directory.ClearLock(System.String)">ClearLock(String)</h4>
<div class="markdown level1 summary"><p>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. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract void ClearLock(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><p>name of the lock to be cleared. </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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_Copy_Lucene_Net_Store_Directory_System_String_System_String_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.Copy(Lucene.Net.Store.Directory%2CSystem.String%2CSystem.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L193">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_Copy_" data-uid="Lucene.Net.Store.Directory.Copy*"></a>
<h4 id="Lucene_Net_Store_Directory_Copy_Lucene_Net_Store_Directory_System_String_System_String_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Store.Directory.Copy(Lucene.Net.Store.Directory,System.String,System.String,Lucene.Net.Store.IOContext)">Copy(Directory, String, String, IOContext)</h4>
<div class="markdown level1 summary"><p>Copies the file <code data-dev-comment-type="paramref" class="paramref">src</code> to <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> <code data-dev-comment-type="paramref" class="paramref">to</code> under the new
file name <code data-dev-comment-type="paramref" class="paramref">dest</code>.
<p>
If you want to copy the entire source directory to the destination one, you
can do so like this:</p>
<pre><code>Directory to; // the directory to copy to
foreach (string file in dir.ListAll()) {
dir.Copy(to, file, newFile, IOContext.DEFAULT); // newFile can be either file, or a new name
}</code></pre>
<p><p>
<strong>NOTE:</strong> this method does not check whether <code data-dev-comment-type="paramref" class="paramref">dest</code> exist and will
overwrite it if it does.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual void Copy(Directory to, string src, string dest, 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><a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a></td>
<td><span class="parametername">to</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">src</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">dest</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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_CreateOutput_System_String_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L81">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_CreateOutput_" data-uid="Lucene.Net.Store.Directory.CreateOutput*"></a>
<h4 id="Lucene_Net_Store_Directory_CreateOutput_System_String_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Store.Directory.CreateOutput(System.String,Lucene.Net.Store.IOContext)">CreateOutput(String, IOContext)</h4>
<div class="markdown level1 summary"><p>Creates a new, empty file in the directory with the given name.
Returns a stream writing this file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract 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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_CreateSlicer_System_String_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.CreateSlicer(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L246">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_CreateSlicer_" data-uid="Lucene.Net.Store.Directory.CreateSlicer*"></a>
<h4 id="Lucene_Net_Store_Directory_CreateSlicer_System_String_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Store.Directory.CreateSlicer(System.String,Lucene.Net.Store.IOContext)">CreateSlicer(String, IOContext)</h4>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="Lucene.Net.Store.Directory.IndexInputSlicer.html">Directory.IndexInputSlicer</a> for the given file name.
<a class="xref" href="Lucene.Net.Store.Directory.IndexInputSlicer.html">Directory.IndexInputSlicer</a> allows other <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> implementations to
efficiently open one or more sliced <a class="xref" href="Lucene.Net.Store.IndexInput.html">IndexInput</a> instances from a
single file handle. The underlying file handle is kept open until the
<a class="xref" href="Lucene.Net.Store.Directory.IndexInputSlicer.html">Directory.IndexInputSlicer</a> is closed.
<p>Throws <span class="xref">System.IO.FileNotFoundException</span>
if the file does not exist.
<p>
<div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div><div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual Directory.IndexInputSlicer CreateSlicer(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.Directory.IndexInputSlicer.html">Directory.IndexInputSlicer</a></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.IOException</span></td>
<td><p>if an <span class="xref">System.IO.IOException</span> occurs</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_DeleteFile_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L61">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_DeleteFile_" data-uid="Lucene.Net.Store.Directory.DeleteFile*"></a>
<h4 id="Lucene_Net_Store_Directory_DeleteFile_System_String_" data-uid="Lucene.Net.Store.Directory.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 abstract 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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_Dispose.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.Dispose%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L130">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_Dispose_" data-uid="Lucene.Net.Store.Directory.Dispose*"></a>
<h4 id="Lucene_Net_Store_Directory_Dispose" data-uid="Lucene.Net.Store.Directory.Dispose">Dispose()</h4>
<div class="markdown level1 summary"><p>Disposes the store. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_Dispose_System_Boolean_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L138">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_Dispose_" data-uid="Lucene.Net.Store.Directory.Dispose*"></a>
<h4 id="Lucene_Net_Store_Directory_Dispose_System_Boolean_" data-uid="Lucene.Net.Store.Directory.Dispose(System.Boolean)">Dispose(Boolean)</h4>
<div class="markdown level1 summary"><p>Disposes the store. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected abstract 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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_EnsureOpen.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.EnsureOpen%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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L290">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_EnsureOpen_" data-uid="Lucene.Net.Store.Directory.EnsureOpen*"></a>
<h4 id="Lucene_Net_Store_Directory_EnsureOpen" data-uid="Lucene.Net.Store.Directory.EnsureOpen">EnsureOpen()</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 EnsureOpen()</code></pre>
</div>
<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.ObjectDisposedException</span></td>
<td><p>if this Directory is closed </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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_FileExists_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L56">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_FileExists_" data-uid="Lucene.Net.Store.Directory.FileExists*"></a>
<h4 id="Lucene_Net_Store_Directory_FileExists_System_String_" data-uid="Lucene.Net.Store.Directory.FileExists(System.String)">FileExists(String)</h4>
<div class="markdown level1 summary"><p>Returns <code>true</code> 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 abstract 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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_FileLength_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L75">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_FileLength_" data-uid="Lucene.Net.Store.Directory.FileLength*"></a>
<h4 id="Lucene_Net_Store_Directory_FileLength_System_String_" data-uid="Lucene.Net.Store.Directory.FileLength(System.String)">FileLength(String)</h4>
<div class="markdown level1 summary"><p>Returns the length of a file in the directory. this method follows the
following contract:</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract 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><p>the name of the file for which to return the length. </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><span class="xref">System.Int64</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.IOException</span></td>
<td><p>if there was an IO error while retrieving the file&apos;s
length. </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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_GetLockID.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L166">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_GetLockID_" data-uid="Lucene.Net.Store.Directory.GetLockID*"></a>
<h4 id="Lucene_Net_Store_Directory_GetLockID" data-uid="Lucene.Net.Store.Directory.GetLockID">GetLockID()</h4>
<div class="markdown level1 summary"><p>Return a string identifier that uniquely differentiates
this <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> instance from other <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> instances.
This ID should be the same if two <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> instances
(even in different AppDomains and/or on different machines)
are considered &quot;the same index&quot;. This is how locking
&quot;scopes&quot; to the right index.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual 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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_ListAll.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L51">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_ListAll_" data-uid="Lucene.Net.Store.Directory.ListAll*"></a>
<h4 id="Lucene_Net_Store_Directory_ListAll" data-uid="Lucene.Net.Store.Directory.ListAll">ListAll()</h4>
<div class="markdown level1 summary"><p>Returns an array of strings, one for each 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 abstract 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="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 is not prepared for any
write operations (such as <a class="xref" href="Lucene.Net.Store.Directory.html#Lucene_Net_Store_Directory_CreateOutput_System_String_Lucene_Net_Store_IOContext_">CreateOutput(String, IOContext)</a>). </p>
</td>
</tr>
<tr>
<td><span class="xref">System.IO.IOException</span></td>
<td><p>in case of other IO errors </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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_MakeLock_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.MakeLock(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L118">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_MakeLock_" data-uid="Lucene.Net.Store.Directory.MakeLock*"></a>
<h4 id="Lucene_Net_Store_Directory_MakeLock_System_String_" data-uid="Lucene.Net.Store.Directory.MakeLock(System.String)">MakeLock(String)</h4>
<div class="markdown level1 summary"><p>Construct a <a class="xref" href="Lucene.Net.Store.Lock.html">Lock</a>. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract Lock MakeLock(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><p>the name of the lock file </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.Lock.html">Lock</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_OpenChecksumInput_System_String_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.OpenChecksumInput(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L110">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_OpenChecksumInput_" data-uid="Lucene.Net.Store.Directory.OpenChecksumInput*"></a>
<h4 id="Lucene_Net_Store_Directory_OpenChecksumInput_System_String_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Store.Directory.OpenChecksumInput(System.String,Lucene.Net.Store.IOContext)">OpenChecksumInput(String, IOContext)</h4>
<div class="markdown level1 summary"><p>Returns a stream reading an existing file, computing checksum as it reads </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual ChecksumIndexInput OpenChecksumInput(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.ChecksumIndexInput.html">ChecksumIndexInput</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_OpenInput_System_String_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.OpenInput(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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L106">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_OpenInput_" data-uid="Lucene.Net.Store.Directory.OpenInput*"></a>
<h4 id="Lucene_Net_Store_Directory_OpenInput_System_String_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Store.Directory.OpenInput(System.String,Lucene.Net.Store.IOContext)">OpenInput(String, IOContext)</h4>
<div class="markdown level1 summary"><p>Returns a stream reading an existing file, with the
specified read buffer size. The particular <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a>
implementation may ignore the buffer size. Currently
the only <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> implementations that respect this
parameter are <a class="xref" href="Lucene.Net.Store.FSDirectory.html">FSDirectory</a> and
<a class="xref" href="Lucene.Net.Store.CompoundFileDirectory.html">CompoundFileDirectory</a>.
<p>Throws <span class="xref">System.IO.FileNotFoundException</span>
if the file does not exist.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract IndexInput OpenInput(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.IndexInput.html">IndexInput</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_SetLockFactory_Lucene_Net_Store_LockFactory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L148">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_SetLockFactory_" data-uid="Lucene.Net.Store.Directory.SetLockFactory*"></a>
<h4 id="Lucene_Net_Store_Directory_SetLockFactory_Lucene_Net_Store_LockFactory_" data-uid="Lucene.Net.Store.Directory.SetLockFactory(Lucene.Net.Store.LockFactory)">SetLockFactory(LockFactory)</h4>
<div class="markdown level1 summary"><p>Set the <a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a> that this <a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a> instance should
use for its locking implementation. Each * instance of
<a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</a> should only be used for one directory (ie,
do not share a single instance across multiple
Directories).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract 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><p>instance of <a class="xref" href="Lucene.Net.Store.LockFactory.html">LockFactory</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_Sync_System_Collections_Generic_ICollection_System_String__.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L94">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_Sync_" data-uid="Lucene.Net.Store.Directory.Sync*"></a>
<h4 id="Lucene_Net_Store_Directory_Sync_System_Collections_Generic_ICollection_System_String__" data-uid="Lucene.Net.Store.Directory.Sync(System.Collections.Generic.ICollection{System.String})">Sync(ICollection&lt;String&gt;)</h4>
<div class="markdown level1 summary"><p>Ensure that any writes to these files 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.<br>
<br>
NOTE: Clients may call this method for same files over
and over again, so some impls might optimize for that.
For other impls the operation can be a noop, for various
reasons.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract 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>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory_ToString.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.Directory.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/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L171">View Source</a>
</span>
<a id="Lucene_Net_Store_Directory_ToString_" data-uid="Lucene.Net.Store.Directory.ToString*"></a>
<h4 id="Lucene_Net_Store_Directory_ToString" data-uid="Lucene.Net.Store.Directory.ToString">ToString()</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 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><span class="xref">System.Object.ToString()</span></div>
<h3 id="implements">Implements</h3>
<div>
<span class="xref">System.IDisposable</span>
</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Store_Directory.md&amp;value=---%0Auid%3A%20Lucene.Net.Store.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" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Store/Directory.cs/#L43" 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 Licensed to the Apache Software Foundation (ASF)
</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>