613 lines
20 KiB
HTML
613 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Class FileUtil | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Class FileUtil | HiAPI-C# 2025 ">
|
|
|
|
<meta name="description" content="Utility to manage files.">
|
|
<link rel="icon" href="../img/HiAPI.favicon.ico">
|
|
<link rel="stylesheet" href="../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../public/main.css">
|
|
<meta name="docfx:navrel" content="../toc.html">
|
|
<meta name="docfx:tocrel" content="toc.html">
|
|
|
|
<meta name="docfx:rel" content="../">
|
|
|
|
|
|
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
|
|
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="Hi.Common.FileLines.FileUtil">
|
|
|
|
|
|
|
|
<h1 id="Hi_Common_FileLines_FileUtil" data-uid="Hi.Common.FileLines.FileUtil" class="text-break">
|
|
Class FileUtil
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.Common.html">Common</a>.<a class="xref" href="Hi.Common.FileLines.html">FileLines</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>HiGeom.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"><p>Utility to manage files.</p>
|
|
</div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static class FileUtil</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<dl class="typelist inheritance">
|
|
<dt>Inheritance</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div><span class="xref">FileUtil</span></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="typelist inheritedMembers">
|
|
<dt>Inherited Members</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_CopyDirectory_" data-uid="Hi.Common.FileLines.FileUtil.CopyDirectory*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_CopyDirectory_System_String_System_String_" data-uid="Hi.Common.FileLines.FileUtil.CopyDirectory(System.String,System.String)">
|
|
CopyDirectory(string, string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Copies a directory and all its contents to a destination folder.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static void CopyDirectory(string sourceFolder, string destFolder)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>sourceFolder</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>Source directory path</p>
|
|
</dd>
|
|
<dt><code>destFolder</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>Destination directory path</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_CreateWithDirectoryAndGetFileStream_" data-uid="Hi.Common.FileLines.FileUtil.CreateWithDirectoryAndGetFileStream*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_CreateWithDirectoryAndGetFileStream_System_String_" data-uid="Hi.Common.FileLines.FileUtil.CreateWithDirectoryAndGetFileStream(System.String)">
|
|
CreateWithDirectoryAndGetFileStream(string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Creates or loads a file with directory.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static FileStream CreateWithDirectoryAndGetFileStream(string filePath)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>file path</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.filestream">FileStream</a></dt>
|
|
<dd><p>file stream</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_CreateWithDirectoryIfNotExisted_" data-uid="Hi.Common.FileLines.FileUtil.CreateWithDirectoryIfNotExisted*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_CreateWithDirectoryIfNotExisted_System_String_" data-uid="Hi.Common.FileLines.FileUtil.CreateWithDirectoryIfNotExisted(System.String)">
|
|
CreateWithDirectoryIfNotExisted(string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static bool CreateWithDirectoryIfNotExisted(string filePath)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd><p>true if file created.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_EnsureDirectory_" data-uid="Hi.Common.FileLines.FileUtil.EnsureDirectory*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_EnsureDirectory_System_String_" data-uid="Hi.Common.FileLines.FileUtil.EnsureDirectory(System.String)">
|
|
EnsureDirectory(string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Ensures that the specified directory exists, creating it if necessary.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static void EnsureDirectory(string directory)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>directory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The directory path to ensure exists.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_GetAbsentPath_" data-uid="Hi.Common.FileLines.FileUtil.GetAbsentPath*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_GetAbsentPath_System_String_System_String_" data-uid="Hi.Common.FileLines.FileUtil.GetAbsentPath(System.String,System.String)">
|
|
GetAbsentPath(string, string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets a path that doesn't exist by appending a number to the base path.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static string GetAbsentPath(string pathWithoutExtension, string extension)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>pathWithoutExtension</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The base path without extension.</p>
|
|
</dd>
|
|
<dt><code>extension</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The file extension.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>A path that doesn't exist.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_GetAbsentRelPath_" data-uid="Hi.Common.FileLines.FileUtil.GetAbsentRelPath*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_GetAbsentRelPath_System_String_System_String_System_String_" data-uid="Hi.Common.FileLines.FileUtil.GetAbsentRelPath(System.String,System.String,System.String)">
|
|
GetAbsentRelPath(string, string, string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets a relative path that doesn't exist by appending a number to the base path.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static string GetAbsentRelPath(string baseDirectory, string relPathWithoutExtension, string extension)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The base directory.</p>
|
|
</dd>
|
|
<dt><code>relPathWithoutExtension</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The relative path without extension.</p>
|
|
</dd>
|
|
<dt><code>extension</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The file extension.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>A relative path that doesn't exist.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_GetDescendentPath_" data-uid="Hi.Common.FileLines.FileUtil.GetDescendentPath*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_GetDescendentPath_System_String_" data-uid="Hi.Common.FileLines.FileUtil.GetDescendentPath(System.String)">
|
|
GetDescendentPath(string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Get descendent path if the <code class="paramref">path</code> is descendent of current path; otherwise
|
|
return <code class="paramref">path</code>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static string GetDescendentPath(string path)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>path</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>descendent path if the <code class="paramref">path</code> is descendent of current path; otherwise
|
|
return <code class="paramref">path</code></p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_GetFileSizeString_" data-uid="Hi.Common.FileLines.FileUtil.GetFileSizeString*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_GetFileSizeString_System_IO_FileInfo_System_String_" data-uid="Hi.Common.FileLines.FileUtil.GetFileSizeString(System.IO.FileInfo,System.String)">
|
|
GetFileSizeString(FileInfo, string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets a formatted string representing the file size.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static string GetFileSizeString(this FileInfo fileInfo, string format = "{0,6:###.00} {1,-2:##}")</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>fileInfo</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a></dt>
|
|
<dd><p>The file information.</p>
|
|
</dd>
|
|
<dt><code>format</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The format string to use.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>A formatted string representing the file size.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_IsBinaryFile_" data-uid="Hi.Common.FileLines.FileUtil.IsBinaryFile*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_IsBinaryFile_System_String_" data-uid="Hi.Common.FileLines.FileUtil.IsBinaryFile(System.String)">
|
|
IsBinaryFile(string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Determines if a file is likely to be a binary file by checking for control characters.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static bool IsBinaryFile(string filePath)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>Path to the file to check</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd><p>True if the file appears to be binary, false otherwise</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_ReadAllTextWithFileShareAsync_" data-uid="Hi.Common.FileLines.FileUtil.ReadAllTextWithFileShareAsync*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_ReadAllTextWithFileShareAsync_System_String_" data-uid="Hi.Common.FileLines.FileUtil.ReadAllTextWithFileShareAsync(System.String)">
|
|
ReadAllTextWithFileShareAsync(string)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Reads all text from a file with file sharing enabled.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static Task<string> ReadAllTextWithFileShareAsync(string filePath)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd><p>The path of the file to read.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd><p>A task that represents the asynchronous read operation, which wraps the file contents.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_FileLines_FileUtil_ToIndexedFile_" data-uid="Hi.Common.FileLines.FileUtil.ToIndexedFile*"></a>
|
|
|
|
<h3 id="Hi_Common_FileLines_FileUtil_ToIndexedFile_System_Collections_Generic_IEnumerable_System_String__" data-uid="Hi.Common.FileLines.FileUtil.ToIndexedFile(System.Collections.Generic.IEnumerable{System.String})">
|
|
ToIndexedFile(IEnumerable<string>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Converts a collection of file paths to a collection of indexed files.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static IEnumerable<IndexedFile> ToIndexedFile(this IEnumerable<string> files)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>files</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd><p>The collection of file paths.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><<a class="xref" href="Hi.Common.FileLines.IndexedFile.html">IndexedFile</a>></dt>
|
|
<dd><p>A collection of indexed files.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|