blob: 49d4b3cefd6592d02346c26105060afb094ec32c [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 IndexFileNames
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class IndexFileNames
| 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.Index.IndexFileNames">
<h1 id="Lucene_Net_Index_IndexFileNames" data-uid="Lucene.Net.Index.IndexFileNames" class="text-break">Class IndexFileNames
</h1>
<div class="markdown level0 summary"><p>This class contains useful constants representing filenames and extensions
used by lucene, as well as convenience methods for querying whether a file
name matches an extension (<a class="xref" href="Lucene.Net.Index.IndexFileNames.html#Lucene_Net_Index_IndexFileNames_MatchesExtension_System_String_System_String_">MatchesExtension(String, String)</a>),
as well as generating file names from a segment name,
generation and extension
(<a class="xref" href="Lucene.Net.Index.IndexFileNames.html#Lucene_Net_Index_IndexFileNames_FileNameFromGeneration_System_String_System_String_System_Int64_">FileNameFromGeneration(String, String, Int64)</a>,
<a class="xref" href="Lucene.Net.Index.IndexFileNames.html#Lucene_Net_Index_IndexFileNames_SegmentFileName_System_String_System_String_System_String_">SegmentFileName(String, String, String)</a>).</p>
<p><p><strong>NOTE</strong>: extensions used by codecs are not
listed here. You must interact with the <a class="xref" href="Lucene.Net.Codecs.Codec.html">Codec</a>
directly.
<p>
<div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div></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">IndexFileNames</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>
<span class="xref">System.Object.ToString()</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Index.html">Lucene.Net.Index</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Index_IndexFileNames_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public sealed class IndexFileNames</code></pre>
</div>
<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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_IndexFileNames_CODEC_FILE_PATTERN.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.CODEC_FILE_PATTERN%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/Index/IndexFileNames.cs/#L254">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_CODEC_FILE_PATTERN" data-uid="Lucene.Net.Index.IndexFileNames.CODEC_FILE_PATTERN">CODEC_FILE_PATTERN</h4>
<div class="markdown level1 summary"><p>All files created by codecs much match this pattern (checked in
<a class="xref" href="Lucene.Net.Index.SegmentInfo.html">SegmentInfo</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 readonly Regex CODEC_FILE_PATTERN</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.Text.RegularExpressions.Regex</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_Index_IndexFileNames_COMPOUND_FILE_ENTRIES_EXTENSION.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.COMPOUND_FILE_ENTRIES_EXTENSION%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/Index/IndexFileNames.cs/#L70">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_COMPOUND_FILE_ENTRIES_EXTENSION" data-uid="Lucene.Net.Index.IndexFileNames.COMPOUND_FILE_ENTRIES_EXTENSION">COMPOUND_FILE_ENTRIES_EXTENSION</h4>
<div class="markdown level1 summary"><p>Extension of compound file entries </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string COMPOUND_FILE_ENTRIES_EXTENSION</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.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_Index_IndexFileNames_COMPOUND_FILE_EXTENSION.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.COMPOUND_FILE_EXTENSION%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/Index/IndexFileNames.cs/#L66">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_COMPOUND_FILE_EXTENSION" data-uid="Lucene.Net.Index.IndexFileNames.COMPOUND_FILE_EXTENSION">COMPOUND_FILE_EXTENSION</h4>
<div class="markdown level1 summary"><p>Extension of compound file </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string COMPOUND_FILE_EXTENSION</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.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_Index_IndexFileNames_GEN_EXTENSION.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.GEN_EXTENSION%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/Index/IndexFileNames.cs/#L58">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_GEN_EXTENSION" data-uid="Lucene.Net.Index.IndexFileNames.GEN_EXTENSION">GEN_EXTENSION</h4>
<div class="markdown level1 summary"><p>Extension of gen file </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string GEN_EXTENSION</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.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_Index_IndexFileNames_INDEX_EXTENSIONS.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.INDEX_EXTENSIONS%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/Index/IndexFileNames.cs/#L79">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_INDEX_EXTENSIONS" data-uid="Lucene.Net.Index.IndexFileNames.INDEX_EXTENSIONS">INDEX_EXTENSIONS</h4>
<div class="markdown level1 summary"><p>This array contains all filename extensions used by
Lucene&apos;s index files, with one exception, namely the
extension made up from <code>.s</code> + a number.
Also note that Lucene&apos;s <code>segments_N</code> files
do not have any filename extension.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string[] INDEX_EXTENSIONS</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.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_Index_IndexFileNames_SEGMENTS.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.SEGMENTS%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/Index/IndexFileNames.cs/#L54">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_SEGMENTS" data-uid="Lucene.Net.Index.IndexFileNames.SEGMENTS">SEGMENTS</h4>
<div class="markdown level1 summary"><p>Name of the index segment file </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string SEGMENTS</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.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_Index_IndexFileNames_SEGMENTS_GEN.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.SEGMENTS_GEN%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/Index/IndexFileNames.cs/#L62">View Source</a>
</span>
<h4 id="Lucene_Net_Index_IndexFileNames_SEGMENTS_GEN" data-uid="Lucene.Net.Index.IndexFileNames.SEGMENTS_GEN">SEGMENTS_GEN</h4>
<div class="markdown level1 summary"><p>Name of the generation reference file name </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string SEGMENTS_GEN</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.String</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-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_IndexFileNames_FileNameFromGeneration_System_String_System_String_System_Int64_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.FileNameFromGeneration(System.String%2CSystem.String%2CSystem.Int64)%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/Index/IndexFileNames.cs/#L97">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_FileNameFromGeneration_" data-uid="Lucene.Net.Index.IndexFileNames.FileNameFromGeneration*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_FileNameFromGeneration_System_String_System_String_System_Int64_" data-uid="Lucene.Net.Index.IndexFileNames.FileNameFromGeneration(System.String,System.String,System.Int64)">FileNameFromGeneration(String, String, Int64)</h4>
<div class="markdown level1 summary"><p>Computes the full file name from base, extension and generation. If the
generation is -1, the file name is <code>null</code>. If it&apos;s 0, the file name is
&lt;base&gt;.&lt;ext&gt;. If it&apos;s &gt; 0, the file name is
&lt;base&gt;_&lt;gen&gt;.&lt;ext&gt;.
<p>
<strong>NOTE:</strong> .&lt;ext&gt; is added to the name only if <code>ext</code> is
not an empty string.</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 FileNameFromGeneration(string base, string ext, long gen)</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">base</span></td>
<td><p>main part of the file name </p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">ext</span></td>
<td><p>extension of the filename </p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int64</span></td>
<td><span class="parametername">gen</span></td>
<td><p>generation </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.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_Index_IndexFileNames_GetExtension_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.GetExtension(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/Index/IndexFileNames.cs/#L237">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_GetExtension_" data-uid="Lucene.Net.Index.IndexFileNames.GetExtension*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_GetExtension_System_String_" data-uid="Lucene.Net.Index.IndexFileNames.GetExtension(System.String)">GetExtension(String)</h4>
<div class="markdown level1 summary"><p>Return the extension (anything after the first &apos;.&apos;),
or null if there is no &apos;.&apos; in the file name.</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 GetExtension(string filename)</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">filename</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>
<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_Index_IndexFileNames_MatchesExtension_System_String_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.MatchesExtension(System.String%2CSystem.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/Index/IndexFileNames.cs/#L165">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_MatchesExtension_" data-uid="Lucene.Net.Index.IndexFileNames.MatchesExtension*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_MatchesExtension_System_String_System_String_" data-uid="Lucene.Net.Index.IndexFileNames.MatchesExtension(System.String,System.String)">MatchesExtension(String, String)</h4>
<div class="markdown level1 summary"><p>Returns <code>true</code> if the given filename ends with the given extension. One
should provide a <em>pure</em> extension, without &apos;.&apos;.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool MatchesExtension(string filename, string ext)</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">filename</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">ext</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_Index_IndexFileNames_ParseSegmentName_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.ParseSegmentName(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/Index/IndexFileNames.cs/#L209">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_ParseSegmentName_" data-uid="Lucene.Net.Index.IndexFileNames.ParseSegmentName*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_ParseSegmentName_System_String_" data-uid="Lucene.Net.Index.IndexFileNames.ParseSegmentName(System.String)">ParseSegmentName(String)</h4>
<div class="markdown level1 summary"><p>Parses the segment name out of the given file name.</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 ParseSegmentName(string filename)</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">filename</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><p>the segment name only, or filename
if it does not contain a &apos;.&apos; and &apos;_&apos;. </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_Index_IndexFileNames_SegmentFileName_System_String_System_String_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.SegmentFileName(System.String%2CSystem.String%2CSystem.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/Index/IndexFileNames.cs/#L138">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_SegmentFileName_" data-uid="Lucene.Net.Index.IndexFileNames.SegmentFileName*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_SegmentFileName_System_String_System_String_System_String_" data-uid="Lucene.Net.Index.IndexFileNames.SegmentFileName(System.String,System.String,System.String)">SegmentFileName(String, String, String)</h4>
<div class="markdown level1 summary"><p>Returns a file name that includes the given segment name, your own custom
name and extension. The format of the filename is:
&lt;segmentName&gt;(_&lt;name&gt;)(.&lt;ext&gt;).
<p>
<strong>NOTE:</strong> .&lt;ext&gt; is added to the result file name only if</p>
<pre><code>ext</code></pre> is not empty.
<p><p>
<strong>NOTE:</strong> _&lt;segmentSuffix&gt; is added to the result file name only if
it&apos;s not the empty string
<p>
<strong>NOTE:</strong> all custom files should be named using this method, or
otherwise some structures may fail to handle them properly (such as if they
are added to compound files).</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 SegmentFileName(string segmentName, string segmentSuffix, string ext)</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">segmentName</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">segmentSuffix</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">ext</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>
<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_Index_IndexFileNames_StripExtension_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.StripExtension(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/Index/IndexFileNames.cs/#L223">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_StripExtension_" data-uid="Lucene.Net.Index.IndexFileNames.StripExtension*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_StripExtension_System_String_" data-uid="Lucene.Net.Index.IndexFileNames.StripExtension(System.String)">StripExtension(String)</h4>
<div class="markdown level1 summary"><p>Removes the extension (anything after the first &apos;.&apos;),
otherwise returns the original filename.</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 StripExtension(string filename)</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">filename</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>
<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_Index_IndexFileNames_StripSegmentName_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames.StripSegmentName(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/Index/IndexFileNames.cs/#L194">View Source</a>
</span>
<a id="Lucene_Net_Index_IndexFileNames_StripSegmentName_" data-uid="Lucene.Net.Index.IndexFileNames.StripSegmentName*"></a>
<h4 id="Lucene_Net_Index_IndexFileNames_StripSegmentName_System_String_" data-uid="Lucene.Net.Index.IndexFileNames.StripSegmentName(System.String)">StripSegmentName(String)</h4>
<div class="markdown level1 summary"><p>Strips the segment name out of the given file name. If you used
<a class="xref" href="Lucene.Net.Index.IndexFileNames.html#Lucene_Net_Index_IndexFileNames_SegmentFileName_System_String_System_String_System_String_">SegmentFileName(String, String, String)</a> or <a class="xref" href="Lucene.Net.Index.IndexFileNames.html#Lucene_Net_Index_IndexFileNames_FileNameFromGeneration_System_String_System_String_System_Int64_">FileNameFromGeneration(String, String, Int64)</a> to create your
files, then this method simply removes whatever comes before the first &apos;.&apos;,
or the second &apos;_&apos; (excluding both).</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 StripSegmentName(string filename)</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">filename</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><p>the filename with the segment name removed, or the given filename
if it does not contain a &apos;.&apos; and &apos;_&apos;. </p>
</td>
</tr>
</tbody>
</table>
</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_Index_IndexFileNames.md&amp;value=---%0Auid%3A%20Lucene.Net.Index.IndexFileNames%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/Index/IndexFileNames.cs/#L44" 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>