289 lines
52 KiB
HTML
Vendored
289 lines
52 KiB
HTML
Vendored
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.13.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>dl: E:/dl_ai/dl/dl/io/dl_file.h 源文件</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">dl
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- 制作者 Doxygen 1.13.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','搜索',false);
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){ initResizable(false); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_17297ffb27ce571941f5fb5008f01a1f.html">dl</a></li><li class="navelem"><a class="el" href="dir_8618662f707661daa8368f9a64c30c2e.html">io</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">dl_file.h</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="dl__file_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#pragma once</span></div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include <string></span></div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include <fstream></span></div>
|
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include "<a class="code" href="dl__tree_8h.html">base/dl_tree.h</a>"</span></div>
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include "<a class="code" href="dl__buffer_8h.html">memory/dl_buffer.h</a>"</span></div>
|
|
<div class="foldopen" id="foldopen00038" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html"> 38</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacedl_1_1_file.html">dl::File</a></div>
|
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>{</div>
|
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
|
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span></div>
|
|
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2"> 50</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2">GetPathFileAll</a>(std::string_view path, std::vector<std::string>& ret,</div>
|
|
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> std::string_view regex = <span class="stringliteral">""</span>, <span class="keywordtype">bool</span> recursion = <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
|
<div class="foldopen" id="foldopen00053" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="structdl_1_1_file_1_1_search_rule.html"> 53</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structdl_1_1_file_1_1_search_rule.html">SearchRule</a></div>
|
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>{</div>
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="structdl_1_1_file_1_1_search_rule.html#ab4f070715a0d61f7d62a8a34c035eeb3"> 55</a></span> std::vector<std::string> <a class="code hl_variable" href="structdl_1_1_file_1_1_search_rule.html#ab4f070715a0d61f7d62a8a34c035eeb3">_vecFmt</a>; <span class="comment">// 要求的格式</span></div>
|
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="structdl_1_1_file_1_1_search_rule.html#ad7cd1cdc8d59718d075c0d46cdc3d13d"> 56</a></span> std::vector<std::string> <a class="code hl_variable" href="structdl_1_1_file_1_1_search_rule.html#ad7cd1cdc8d59718d075c0d46cdc3d13d">_vecFilter</a>;<span class="comment">// 过滤的文件</span></div>
|
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span></div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#af7e3a8109f74c2c3bb04fbb6394c94bc"> 66</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2">GetPathFileAll</a>(std::string_view path, std::vector<std::string>& ret,</div>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">const</span> <a class="code hl_struct" href="structdl_1_1_file_1_1_search_rule.html">SearchRule</a>& rule, <span class="keywordtype">bool</span> recursion = <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span></div>
|
|
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a66b12455ef0b35f95b15187bd7904f8f"> 79</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a66b12455ef0b35f95b15187bd7904f8f">GetPathContent</a>(std::string_view path, std::vector<std::string>& ret,</div>
|
|
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> std::string_view regex = <span class="stringliteral">""</span>, <span class="keywordtype">bool</span> folder = <span class="keyword">true</span>, <span class="keywordtype">bool</span> file = <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span></div>
|
|
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a6895b6ac40510ed6afda659ca290bf9c"> 87</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a6895b6ac40510ed6afda659ca290bf9c">GetPathContentAll</a>(std::string_view path, <a class="code hl_class" href="classdl_1_1_n_tree.html">NTree<std::string></a>& ret);</div>
|
|
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span></div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a28468f91b9f718653b091db839b241b0"> 97</a></span>FILE* <a class="code hl_function" href="namespacedl_1_1_file.html#a28468f91b9f718653b091db839b241b0">GetFile</a>(std::string_view path_name, <span class="keywordtype">bool</span> is_binary = <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a7afdc780937a728bb52260dfab167e20"> 99</a></span>std::ifstream <a class="code hl_function" href="namespacedl_1_1_file.html#a7afdc780937a728bb52260dfab167e20">Get</a>(std::string_view path_name, <span class="keywordtype">bool</span> is_binary = <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span></div>
|
|
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ac04461b090a20b71d44a5f9bfa859077"> 110</a></span>std::ofstream <a class="code hl_function" href="namespacedl_1_1_file.html#ac04461b090a20b71d44a5f9bfa859077">Set</a>(std::string_view path_name, </div>
|
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordtype">bool</span> is_binary = <span class="keyword">true</span>, </div>
|
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordtype">bool</span> is_app = <span class="keyword">false</span>);</div>
|
|
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span></div>
|
|
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a89af12f224acac3614dbbbc32c53bb66"> 120</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a89af12f224acac3614dbbbc32c53bb66">ConvertMb2U8</a>(std::string_view path_name, std::string_view out);</div>
|
|
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span></div>
|
|
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#acef558947516ea7634735cd708280372"> 126</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#acef558947516ea7634735cd708280372">GetString</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span></div>
|
|
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ae7bb62971470fc3c4cdf7bc161a05206"> 133</a></span><a class="code hl_typedef" href="namespacedl.html#a6e3289cc5115dab4f1818f19fb766e94">Buffer</a> <a class="code hl_function" href="namespacedl_1_1_file.html#ae7bb62971470fc3c4cdf7bc161a05206">GetBuffer</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span></div>
|
|
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ab131ba95d1079fabc232fbb3452ae132"> 140</a></span><a class="code hl_typedef" href="namespacedl.html#a6e3289cc5115dab4f1818f19fb766e94">Buffer</a> <a class="code hl_function" href="namespacedl_1_1_file.html#ae7bb62971470fc3c4cdf7bc161a05206">GetBuffer</a>(std::ifstream& ifs);</div>
|
|
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span></div>
|
|
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a8281f88a2d0a6e3c28610589e3858e84"> 147</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a8281f88a2d0a6e3c28610589e3858e84">SaveBuffer</a>(<a class="code hl_typedef" href="namespacedl.html#a0e44c1b516814389464e02ec1e842e7f">BufferView</a> buf, std::string_view path_name);</div>
|
|
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span></div>
|
|
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a4ef6bbd7cbaa49af9256047c8150a526"> 154</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a4ef6bbd7cbaa49af9256047c8150a526">SaveString</a>(<a class="code hl_typedef" href="namespacedl.html#a0e44c1b516814389464e02ec1e842e7f">BufferView</a> buf, std::string_view path_name);</div>
|
|
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span></div>
|
|
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ae4009d848f74b85d922cd73b9870c353"> 161</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a4ef6bbd7cbaa49af9256047c8150a526">SaveString</a>(std::string_view str, std::string_view path_name);</div>
|
|
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
|
|
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span></div>
|
|
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="comment">//* @brief 返回文件Blake2b值</span></div>
|
|
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="comment">//* @param[in] path_name 路径名称</span></div>
|
|
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span><span class="comment">//* @param[out] Blake2b 返回值(512位)</span></div>
|
|
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span><span class="comment">//*/</span></div>
|
|
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="comment">//bool HashBlake2b(std::string_view path_name, Crypto::Blake2b& blake2b);</span></div>
|
|
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="comment">//</span></div>
|
|
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span><span class="comment">//* @brief 效验文件Blake2b值</span></div>
|
|
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span><span class="comment">//* @param[in] path_name 路径名称</span></div>
|
|
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="comment">//* @param[in] digest 消息摘要(512位)</span></div>
|
|
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="comment">//*/</span></div>
|
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><span class="comment">//bool HashBlake2bCheck(std::string_view path_name, const Crypto::Blake2b& digest);</span></div>
|
|
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span></div>
|
|
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a22b74cc015e6e1ed05c1455b091807e0"> 183</a></span>uint32_t <a class="code hl_function" href="namespacedl_1_1_file.html#a22b74cc015e6e1ed05c1455b091807e0">GetCrc32</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
|
|
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span></div>
|
|
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a65a4abe44715791a0dde4aeb6e9497ed"> 191</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a65a4abe44715791a0dde4aeb6e9497ed">IsExist</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span></div>
|
|
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ab8e67825de6beb023ce02d725f7eda9a"> 199</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#ab8e67825de6beb023ce02d725f7eda9a">Delete</a>(std::string_view path_name, <span class="keywordtype">bool</span> all = <span class="keyword">false</span>);</div>
|
|
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span></div>
|
|
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a02a311244c38b5ff3083b8a2435efedd"> 206</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a02a311244c38b5ff3083b8a2435efedd">DeleteContent</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span></div>
|
|
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a6f511ec480c6d9ff53bd134d9d63a926"> 213</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a6f511ec480c6d9ff53bd134d9d63a926">Rename</a>(std::string_view src, std::string_view tar);</div>
|
|
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span></div>
|
|
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a7fd5f1b8db8bad24ab1bb6264dbba0d8"> 221</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a7fd5f1b8db8bad24ab1bb6264dbba0d8">Search</a>(std::string_view path, std::string_view file_name);</div>
|
|
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> </div>
|
|
<div class="foldopen" id="foldopen00223" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0"> 223</a></span><span class="keyword">enum class</span> <a class="code hl_enumeration" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0">CopyMode</a></div>
|
|
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span>{</div>
|
|
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab50339a10e1de285ac99d4c3990b8693"> 225</a></span> <a class="code hl_enumvalue" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab50339a10e1de285ac99d4c3990b8693">NONE</a>, </div>
|
|
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0a3a5974efbe92686d30f0261a204e6ee7"> 226</a></span> <a class="code hl_enumvalue" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0a3a5974efbe92686d30f0261a204e6ee7">OVERRIDE</a>, </div>
|
|
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab85df04e922fe1dd3c1f0692faeaacef"> 227</a></span> <a class="code hl_enumvalue" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab85df04e922fe1dd3c1f0692faeaacef">SKIP</a>, </div>
|
|
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span></div>
|
|
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a050ae2e4c1354100a7c2e317e7407f19"> 236</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a050ae2e4c1354100a7c2e317e7407f19">Copy</a>(std::string_view source, std::string_view target,</div>
|
|
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <a class="code hl_enumeration" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0">CopyMode</a> mode = <a class="code hl_enumvalue" href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab50339a10e1de285ac99d4c3990b8693">CopyMode::NONE</a>, <span class="keywordtype">bool</span> recursion = <span class="keyword">false</span>);</div>
|
|
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span></div>
|
|
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a7a699ea40c9ece134967495363f05222"> 244</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a7a699ea40c9ece134967495363f05222">GetExtension</a>(std::string_view path_name, <span class="keywordtype">bool</span> has_dot = <span class="keyword">false</span>);</div>
|
|
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span></div>
|
|
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#af89a6e722274226cb17cf6865ba1ad4d"> 251</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#af89a6e722274226cb17cf6865ba1ad4d">GetFileName</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a2c38eaa5c040b78e5df6393d42e8ad82"> 257</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a2c38eaa5c040b78e5df6393d42e8ad82">GetStem</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a7cb61eaef6e197f454cd64c01681dfac"> 263</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a7cb61eaef6e197f454cd64c01681dfac">GetFolderName</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a944ba155c2c810d67a8ee8ca5efd6a1b"> 269</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a944ba155c2c810d67a8ee8ca5efd6a1b">GetFilePath</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a84b2589d84e66a0ed7f567d0107f9946"> 276</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a84b2589d84e66a0ed7f567d0107f9946">GetAbsolute</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#acde2d5b52b91b3d4f6740604f47a4313"> 284</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#acde2d5b52b91b3d4f6740604f47a4313">GetRelative</a>(std::string_view path_name, std::string_view path_base);</div>
|
|
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ab5d568af0e137dc89ec8ed0f5a92457b"> 290</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#ab5d568af0e137dc89ec8ed0f5a92457b">GetParentPath</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span></div>
|
|
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ac0f557be990b6b800795fa76107689ef"> 297</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#ac0f557be990b6b800795fa76107689ef">CreateFolder</a>(std::string_view path);</div>
|
|
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span></div>
|
|
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a856568eab88642c605e42e29b87a1c6e"> 304</a></span>time_t <a class="code hl_function" href="namespacedl_1_1_file.html#a856568eab88642c605e42e29b87a1c6e">GetLastWriteTime</a>(std::string_view path_name);</div>
|
|
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> </div>
|
|
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> </div>
|
|
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span></div>
|
|
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a21b1933ea35cbf28b4cce42fce888700"> 319</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a21b1933ea35cbf28b4cce42fce888700">CheckPathFileModified</a>(std::string_view path_name, <span class="keyword">const</span> <a class="code hl_struct" href="structdl_1_1_file_1_1_search_rule.html">SearchRule</a>& rule, std::string_view cache, <span class="keywordtype">bool</span> update);</div>
|
|
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> </div>
|
|
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span><span class="comment">//----------------------------常见路径----------------------------</span></div>
|
|
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a7cb490aa80c8fc8070c104916548bb81"> 328</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a7cb490aa80c8fc8070c104916548bb81">PathCurrent</a>();</div>
|
|
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ac3db9ec3eb4786fe8d34521a9e88dcfe"> 334</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#ac3db9ec3eb4786fe8d34521a9e88dcfe">PathTemp</a>();</div>
|
|
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ad71bbfbb1c1a90047440abf028aa5ba7"> 341</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#ad71bbfbb1c1a90047440abf028aa5ba7">PathStorage</a>();</div>
|
|
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a36bbd794f2614ed394d18e91fa1e3784"> 348</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a36bbd794f2614ed394d18e91fa1e3784">PathStorageRoot</a>();</div>
|
|
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a7ebe295f85a0e5a50db3b6a905ff01b7"> 356</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a7ebe295f85a0e5a50db3b6a905ff01b7">PathPrivate</a>();</div>
|
|
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a9ae206b89c0591bba25e0314b4906c80"> 363</a></span>std::string <a class="code hl_function" href="namespacedl_1_1_file.html#a9ae206b89c0591bba25e0314b4906c80">PathPublic</a>();</div>
|
|
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span></div>
|
|
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#a5764b72cff687878d5a0623be4d3c625"> 369</a></span>std::vector<std::string> <a class="code hl_function" href="namespacedl_1_1_file.html#a5764b72cff687878d5a0623be4d3c625">PathRegular</a>();</div>
|
|
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span></div>
|
|
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span><span class="comment">//string LastWriteTimeTostring(const std::file_time_type& ftime)</span></div>
|
|
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span><span class="comment">//{</span></div>
|
|
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span><span class="comment">// string str;</span></div>
|
|
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span><span class="comment">// std::time_t cftime = file_time_type::clock::time_point(ftime).time_since_epoch();</span></div>
|
|
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span><span class="comment">// std::time_t cftime = std::chrono::system_clock::to_time_t();</span></div>
|
|
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span><span class="comment">// return std::asctime(std::localtime(&cftime));</span></div>
|
|
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span><span class="comment">//}</span></div>
|
|
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> </div>
|
|
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file.html#ac73b5e0cdfedd9f2c98607714cddf643"> 380</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacedl_1_1_file.html#ac73b5e0cdfedd9f2c98607714cddf643">InitFileSystem</a>();</div>
|
|
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span></div>
|
|
<div class="foldopen" id="foldopen00383" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file_1_1_lua.html"> 383</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacedl_1_1_file_1_1_lua.html">Lua</a></div>
|
|
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span>{</div>
|
|
<div class="foldopen" id="foldopen00385" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file_1_1_lua.html#af7a203303a1e486b02dc079c2dc12b55"> 385</a></span> <span class="keyword">inline</span> std::vector<std::string> <a class="code hl_function" href="namespacedl_1_1_file_1_1_lua.html#af7a203303a1e486b02dc079c2dc12b55">lua_GetPathFileAll_3</a>(std::string_view path, std::string_view regex <span class="comment">/*= ""*/</span>, <span class="keywordtype">bool</span> recursion <span class="comment">/*= true*/</span>)</div>
|
|
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> {</div>
|
|
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> std::vector<std::string> ret;</div>
|
|
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2">GetPathFileAll</a>(path, ret, regex, recursion);</div>
|
|
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> <span class="keywordflow">return</span> ret;</div>
|
|
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> }</div>
|
|
</div>
|
|
<div class="foldopen" id="foldopen00391" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file_1_1_lua.html#ad869c8924ef234aac34c9755ffc8af0b"> 391</a></span> <span class="keyword">inline</span> std::vector<std::string> <a class="code hl_function" href="namespacedl_1_1_file_1_1_lua.html#ad869c8924ef234aac34c9755ffc8af0b">lua_GetPathFileAll_2</a>(std::string_view path,</div>
|
|
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> std::string_view regex)</div>
|
|
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> {</div>
|
|
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> std::vector<std::string> ret;</div>
|
|
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2">GetPathFileAll</a>(path, ret, regex, <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> <span class="keywordflow">return</span> ret;</div>
|
|
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> }</div>
|
|
</div>
|
|
<div class="foldopen" id="foldopen00398" data-start="{" data-end="}">
|
|
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"><a class="line" href="namespacedl_1_1_file_1_1_lua.html#acdc3742662ec072a6fc286d52026a5de"> 398</a></span> <span class="keyword">inline</span> std::vector<std::string> <a class="code hl_function" href="namespacedl_1_1_file_1_1_lua.html#acdc3742662ec072a6fc286d52026a5de">lua_GetPathFileAll_1</a>(std::string_view path)</div>
|
|
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> {</div>
|
|
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> std::vector<std::string> ret;</div>
|
|
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> <a class="code hl_function" href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2">GetPathFileAll</a>(path, ret, <span class="stringliteral">""</span>, <span class="keyword">true</span>);</div>
|
|
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> <span class="keywordflow">return</span> ret;</div>
|
|
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> }</div>
|
|
</div>
|
|
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span>}</div>
|
|
</div>
|
|
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> </div>
|
|
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span>}</div>
|
|
</div>
|
|
<div class="ttc" id="aclassdl_1_1_n_tree_html"><div class="ttname"><a href="classdl_1_1_n_tree.html">dl::NTree</a></div><div class="ttdoc">N叉树</div><div class="ttdef"><b>定义</b> <a href="dl__tree_8h_source.html#l00027">dl_tree.h:28</a></div></div>
|
|
<div class="ttc" id="adl__buffer_8h_html"><div class="ttname"><a href="dl__buffer_8h.html">dl_buffer.h</a></div><div class="ttdoc">表示一段内存</div></div>
|
|
<div class="ttc" id="adl__tree_8h_html"><div class="ttname"><a href="dl__tree_8h.html">dl_tree.h</a></div><div class="ttdoc">N叉树</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_1_1_lua_html"><div class="ttname"><a href="namespacedl_1_1_file_1_1_lua.html">dl::File::Lua</a></div><div class="ttdoc">文件系统lua接口</div><div class="ttdef"><b>定义</b> <a href="#l00383">dl_file.h:384</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_1_1_lua_html_acdc3742662ec072a6fc286d52026a5de"><div class="ttname"><a href="namespacedl_1_1_file_1_1_lua.html#acdc3742662ec072a6fc286d52026a5de">dl::File::Lua::lua_GetPathFileAll_1</a></div><div class="ttdeci">std::vector< std::string > lua_GetPathFileAll_1(std::string_view path)</div><div class="ttdef"><b>定义</b> <a href="#l00398">dl_file.h:398</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_1_1_lua_html_ad869c8924ef234aac34c9755ffc8af0b"><div class="ttname"><a href="namespacedl_1_1_file_1_1_lua.html#ad869c8924ef234aac34c9755ffc8af0b">dl::File::Lua::lua_GetPathFileAll_2</a></div><div class="ttdeci">std::vector< std::string > lua_GetPathFileAll_2(std::string_view path, std::string_view regex)</div><div class="ttdef"><b>定义</b> <a href="#l00391">dl_file.h:391</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_1_1_lua_html_af7a203303a1e486b02dc079c2dc12b55"><div class="ttname"><a href="namespacedl_1_1_file_1_1_lua.html#af7a203303a1e486b02dc079c2dc12b55">dl::File::Lua::lua_GetPathFileAll_3</a></div><div class="ttdeci">std::vector< std::string > lua_GetPathFileAll_3(std::string_view path, std::string_view regex, bool recursion)</div><div class="ttdef"><b>定义</b> <a href="#l00385">dl_file.h:385</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html"><div class="ttname"><a href="namespacedl_1_1_file.html">dl::File</a></div><div class="ttdoc">文件系统</div><div class="ttdef"><b>定义</b> <a href="#l00038">dl_file.h:39</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a02a311244c38b5ff3083b8a2435efedd"><div class="ttname"><a href="namespacedl_1_1_file.html#a02a311244c38b5ff3083b8a2435efedd">dl::File::DeleteContent</a></div><div class="ttdeci">void DeleteContent(std::string_view path_name)</div><div class="ttdoc">删除文件夹内容,但不删除文件夹</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a050ae2e4c1354100a7c2e317e7407f19"><div class="ttname"><a href="namespacedl_1_1_file.html#a050ae2e4c1354100a7c2e317e7407f19">dl::File::Copy</a></div><div class="ttdeci">bool Copy(std::string_view source, std::string_view target, CopyMode mode=CopyMode::NONE, bool recursion=false)</div><div class="ttdoc">复制文件或文件夹</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a21b1933ea35cbf28b4cce42fce888700"><div class="ttname"><a href="namespacedl_1_1_file.html#a21b1933ea35cbf28b4cce42fce888700">dl::File::CheckPathFileModified</a></div><div class="ttdeci">bool CheckPathFileModified(std::string_view path_name, const SearchRule &rule, std::string_view cache, bool update)</div><div class="ttdoc">判断路径内的文件是否有修改(包括增加、删除文件)</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a22b74cc015e6e1ed05c1455b091807e0"><div class="ttname"><a href="namespacedl_1_1_file.html#a22b74cc015e6e1ed05c1455b091807e0">dl::File::GetCrc32</a></div><div class="ttdeci">uint32_t GetCrc32(std::string_view path_name)</div><div class="ttdoc">返回文件Blake2b值</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a28468f91b9f718653b091db839b241b0"><div class="ttname"><a href="namespacedl_1_1_file.html#a28468f91b9f718653b091db839b241b0">dl::File::GetFile</a></div><div class="ttdeci">FILE * GetFile(std::string_view path_name, bool is_binary=true)</div><div class="ttdoc">打开一个文件(只读),可能从压缩包内读取</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a2c38eaa5c040b78e5df6393d42e8ad82"><div class="ttname"><a href="namespacedl_1_1_file.html#a2c38eaa5c040b78e5df6393d42e8ad82">dl::File::GetStem</a></div><div class="ttdeci">std::string GetStem(std::string_view path_name)</div><div class="ttdoc">返回文件名不含后缀</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a36bbd794f2614ed394d18e91fa1e3784"><div class="ttname"><a href="namespacedl_1_1_file.html#a36bbd794f2614ed394d18e91fa1e3784">dl::File::PathStorageRoot</a></div><div class="ttdeci">std::string PathStorageRoot()</div><div class="ttdoc">返回存储路径根位置 rw</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a3ee7cd52109759691467c4056ce675f2"><div class="ttname"><a href="namespacedl_1_1_file.html#a3ee7cd52109759691467c4056ce675f2">dl::File::GetPathFileAll</a></div><div class="ttdeci">void GetPathFileAll(std::string_view path, std::vector< std::string > &ret, std::string_view regex="", bool recursion=true)</div><div class="ttdoc">获取文件夹所有文件</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a4ef6bbd7cbaa49af9256047c8150a526"><div class="ttname"><a href="namespacedl_1_1_file.html#a4ef6bbd7cbaa49af9256047c8150a526">dl::File::SaveString</a></div><div class="ttdeci">bool SaveString(BufferView buf, std::string_view path_name)</div><div class="ttdoc">将字符串保存为文件</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a5764b72cff687878d5a0623be4d3c625"><div class="ttname"><a href="namespacedl_1_1_file.html#a5764b72cff687878d5a0623be4d3c625">dl::File::PathRegular</a></div><div class="ttdeci">std::vector< std::string > PathRegular()</div><div class="ttdoc">返回常用路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a65a4abe44715791a0dde4aeb6e9497ed"><div class="ttname"><a href="namespacedl_1_1_file.html#a65a4abe44715791a0dde4aeb6e9497ed">dl::File::IsExist</a></div><div class="ttdeci">bool IsExist(std::string_view path_name)</div><div class="ttdoc">返回文件是否存在</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a65ba6efea9a512e9ba5c2d10d5e3fba0"><div class="ttname"><a href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0">dl::File::CopyMode</a></div><div class="ttdeci">CopyMode</div><div class="ttdef"><b>定义</b> <a href="#l00223">dl_file.h:224</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a65ba6efea9a512e9ba5c2d10d5e3fba0a3a5974efbe92686d30f0261a204e6ee7"><div class="ttname"><a href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0a3a5974efbe92686d30f0261a204e6ee7">dl::File::CopyMode::OVERRIDE</a></div><div class="ttdeci">@ OVERRIDE</div><div class="ttdoc">覆盖</div><div class="ttdef"><b>定义</b> <a href="#l00226">dl_file.h:226</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a65ba6efea9a512e9ba5c2d10d5e3fba0ab50339a10e1de285ac99d4c3990b8693"><div class="ttname"><a href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab50339a10e1de285ac99d4c3990b8693">dl::File::CopyMode::NONE</a></div><div class="ttdeci">@ NONE</div><div class="ttdoc">文件已存在,则返回失败</div><div class="ttdef"><b>定义</b> <a href="#l00225">dl_file.h:225</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a65ba6efea9a512e9ba5c2d10d5e3fba0ab85df04e922fe1dd3c1f0692faeaacef"><div class="ttname"><a href="namespacedl_1_1_file.html#a65ba6efea9a512e9ba5c2d10d5e3fba0ab85df04e922fe1dd3c1f0692faeaacef">dl::File::CopyMode::SKIP</a></div><div class="ttdeci">@ SKIP</div><div class="ttdoc">跳过</div><div class="ttdef"><b>定义</b> <a href="#l00227">dl_file.h:227</a></div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a66b12455ef0b35f95b15187bd7904f8f"><div class="ttname"><a href="namespacedl_1_1_file.html#a66b12455ef0b35f95b15187bd7904f8f">dl::File::GetPathContent</a></div><div class="ttdeci">void GetPathContent(std::string_view path, std::vector< std::string > &ret, std::string_view regex="", bool folder=true, bool file=true)</div><div class="ttdoc">获取文件夹当前内容</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a6895b6ac40510ed6afda659ca290bf9c"><div class="ttname"><a href="namespacedl_1_1_file.html#a6895b6ac40510ed6afda659ca290bf9c">dl::File::GetPathContentAll</a></div><div class="ttdeci">void GetPathContentAll(std::string_view path, NTree< std::string > &ret)</div><div class="ttdoc">获取文件夹所有内容</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a6f511ec480c6d9ff53bd134d9d63a926"><div class="ttname"><a href="namespacedl_1_1_file.html#a6f511ec480c6d9ff53bd134d9d63a926">dl::File::Rename</a></div><div class="ttdeci">bool Rename(std::string_view src, std::string_view tar)</div><div class="ttdoc">重命名文件</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a7a699ea40c9ece134967495363f05222"><div class="ttname"><a href="namespacedl_1_1_file.html#a7a699ea40c9ece134967495363f05222">dl::File::GetExtension</a></div><div class="ttdeci">std::string GetExtension(std::string_view path_name, bool has_dot=false)</div><div class="ttdoc">返回文件后缀</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a7afdc780937a728bb52260dfab167e20"><div class="ttname"><a href="namespacedl_1_1_file.html#a7afdc780937a728bb52260dfab167e20">dl::File::Get</a></div><div class="ttdeci">std::ifstream Get(std::string_view path_name, bool is_binary=true)</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a7cb490aa80c8fc8070c104916548bb81"><div class="ttname"><a href="namespacedl_1_1_file.html#a7cb490aa80c8fc8070c104916548bb81">dl::File::PathCurrent</a></div><div class="ttdeci">std::string PathCurrent()</div><div class="ttdoc">返回资源路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a7cb61eaef6e197f454cd64c01681dfac"><div class="ttname"><a href="namespacedl_1_1_file.html#a7cb61eaef6e197f454cd64c01681dfac">dl::File::GetFolderName</a></div><div class="ttdeci">std::string GetFolderName(std::string_view path_name)</div><div class="ttdoc">返回路径所在文件夹名</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a7ebe295f85a0e5a50db3b6a905ff01b7"><div class="ttname"><a href="namespacedl_1_1_file.html#a7ebe295f85a0e5a50db3b6a905ff01b7">dl::File::PathPrivate</a></div><div class="ttdeci">std::string PathPrivate()</div><div class="ttdoc">返回私有路径 rw</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a7fd5f1b8db8bad24ab1bb6264dbba0d8"><div class="ttname"><a href="namespacedl_1_1_file.html#a7fd5f1b8db8bad24ab1bb6264dbba0d8">dl::File::Search</a></div><div class="ttdeci">std::string Search(std::string_view path, std::string_view file_name)</div><div class="ttdoc">从路径搜索文件</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a8281f88a2d0a6e3c28610589e3858e84"><div class="ttname"><a href="namespacedl_1_1_file.html#a8281f88a2d0a6e3c28610589e3858e84">dl::File::SaveBuffer</a></div><div class="ttdeci">bool SaveBuffer(BufferView buf, std::string_view path_name)</div><div class="ttdoc">将内存保存为文件</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a84b2589d84e66a0ed7f567d0107f9946"><div class="ttname"><a href="namespacedl_1_1_file.html#a84b2589d84e66a0ed7f567d0107f9946">dl::File::GetAbsolute</a></div><div class="ttdeci">std::string GetAbsolute(std::string_view path_name)</div><div class="ttdoc">返回绝对路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a856568eab88642c605e42e29b87a1c6e"><div class="ttname"><a href="namespacedl_1_1_file.html#a856568eab88642c605e42e29b87a1c6e">dl::File::GetLastWriteTime</a></div><div class="ttdeci">time_t GetLastWriteTime(std::string_view path_name)</div><div class="ttdoc">返回文件最后修改时间</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a89af12f224acac3614dbbbc32c53bb66"><div class="ttname"><a href="namespacedl_1_1_file.html#a89af12f224acac3614dbbbc32c53bb66">dl::File::ConvertMb2U8</a></div><div class="ttdeci">bool ConvertMb2U8(std::string_view path_name, std::string_view out)</div><div class="ttdoc">将文本文件从mb转到utf-8</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a944ba155c2c810d67a8ee8ca5efd6a1b"><div class="ttname"><a href="namespacedl_1_1_file.html#a944ba155c2c810d67a8ee8ca5efd6a1b">dl::File::GetFilePath</a></div><div class="ttdeci">std::string GetFilePath(std::string_view path_name)</div><div class="ttdoc">返回文件所在路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_a9ae206b89c0591bba25e0314b4906c80"><div class="ttname"><a href="namespacedl_1_1_file.html#a9ae206b89c0591bba25e0314b4906c80">dl::File::PathPublic</a></div><div class="ttdeci">std::string PathPublic()</div><div class="ttdoc">返回公共路径 rw</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ab5d568af0e137dc89ec8ed0f5a92457b"><div class="ttname"><a href="namespacedl_1_1_file.html#ab5d568af0e137dc89ec8ed0f5a92457b">dl::File::GetParentPath</a></div><div class="ttdeci">std::string GetParentPath(std::string_view path_name)</div><div class="ttdoc">返回上一级路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ab8e67825de6beb023ce02d725f7eda9a"><div class="ttname"><a href="namespacedl_1_1_file.html#ab8e67825de6beb023ce02d725f7eda9a">dl::File::Delete</a></div><div class="ttdeci">bool Delete(std::string_view path_name, bool all=false)</div><div class="ttdoc">删除文件或路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ac04461b090a20b71d44a5f9bfa859077"><div class="ttname"><a href="namespacedl_1_1_file.html#ac04461b090a20b71d44a5f9bfa859077">dl::File::Set</a></div><div class="ttdeci">std::ofstream Set(std::string_view path_name, bool is_binary=true, bool is_app=false)</div><div class="ttdoc">打开一个文件(只写)</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ac0f557be990b6b800795fa76107689ef"><div class="ttname"><a href="namespacedl_1_1_file.html#ac0f557be990b6b800795fa76107689ef">dl::File::CreateFolder</a></div><div class="ttdeci">bool CreateFolder(std::string_view path)</div><div class="ttdoc">创建目录</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ac3db9ec3eb4786fe8d34521a9e88dcfe"><div class="ttname"><a href="namespacedl_1_1_file.html#ac3db9ec3eb4786fe8d34521a9e88dcfe">dl::File::PathTemp</a></div><div class="ttdeci">std::string PathTemp()</div><div class="ttdoc">返回临时路径 rw</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ac73b5e0cdfedd9f2c98607714cddf643"><div class="ttname"><a href="namespacedl_1_1_file.html#ac73b5e0cdfedd9f2c98607714cddf643">dl::File::InitFileSystem</a></div><div class="ttdeci">void InitFileSystem()</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_acde2d5b52b91b3d4f6740604f47a4313"><div class="ttname"><a href="namespacedl_1_1_file.html#acde2d5b52b91b3d4f6740604f47a4313">dl::File::GetRelative</a></div><div class="ttdeci">std::string GetRelative(std::string_view path_name, std::string_view path_base)</div><div class="ttdoc">返回相对路径</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_acef558947516ea7634735cd708280372"><div class="ttname"><a href="namespacedl_1_1_file.html#acef558947516ea7634735cd708280372">dl::File::GetString</a></div><div class="ttdeci">std::string GetString(std::string_view path_name)</div><div class="ttdoc">按文本读文件</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ad71bbfbb1c1a90047440abf028aa5ba7"><div class="ttname"><a href="namespacedl_1_1_file.html#ad71bbfbb1c1a90047440abf028aa5ba7">dl::File::PathStorage</a></div><div class="ttdeci">std::string PathStorage()</div><div class="ttdoc">返回存储路径 rw</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_ae7bb62971470fc3c4cdf7bc161a05206"><div class="ttname"><a href="namespacedl_1_1_file.html#ae7bb62971470fc3c4cdf7bc161a05206">dl::File::GetBuffer</a></div><div class="ttdeci">Buffer GetBuffer(std::string_view path_name)</div><div class="ttdoc">返回文件内存</div></div>
|
|
<div class="ttc" id="anamespacedl_1_1_file_html_af89a6e722274226cb17cf6865ba1ad4d"><div class="ttname"><a href="namespacedl_1_1_file.html#af89a6e722274226cb17cf6865ba1ad4d">dl::File::GetFileName</a></div><div class="ttdeci">std::string GetFileName(std::string_view path_name)</div><div class="ttdoc">返回文件名</div></div>
|
|
<div class="ttc" id="anamespacedl_html_a0e44c1b516814389464e02ec1e842e7f"><div class="ttname"><a href="namespacedl.html#a0e44c1b516814389464e02ec1e842e7f">dl::BufferView</a></div><div class="ttdeci">std::span< std::byte > BufferView</div><div class="ttdef"><b>定义</b> <a href="dl__buffer_8h_source.html#l00025">dl_buffer.h:25</a></div></div>
|
|
<div class="ttc" id="anamespacedl_html_a6e3289cc5115dab4f1818f19fb766e94"><div class="ttname"><a href="namespacedl.html#a6e3289cc5115dab4f1818f19fb766e94">dl::Buffer</a></div><div class="ttdeci">std::vector< std::byte > Buffer</div><div class="ttdef"><b>定义</b> <a href="dl__buffer_8h_source.html#l00024">dl_buffer.h:24</a></div></div>
|
|
<div class="ttc" id="astructdl_1_1_file_1_1_search_rule_html"><div class="ttname"><a href="structdl_1_1_file_1_1_search_rule.html">dl::File::SearchRule</a></div><div class="ttdef"><b>定义</b> <a href="#l00053">dl_file.h:54</a></div></div>
|
|
<div class="ttc" id="astructdl_1_1_file_1_1_search_rule_html_ab4f070715a0d61f7d62a8a34c035eeb3"><div class="ttname"><a href="structdl_1_1_file_1_1_search_rule.html#ab4f070715a0d61f7d62a8a34c035eeb3">dl::File::SearchRule::_vecFmt</a></div><div class="ttdeci">std::vector< std::string > _vecFmt</div><div class="ttdef"><b>定义</b> <a href="#l00055">dl_file.h:55</a></div></div>
|
|
<div class="ttc" id="astructdl_1_1_file_1_1_search_rule_html_ad7cd1cdc8d59718d075c0d46cdc3d13d"><div class="ttname"><a href="structdl_1_1_file_1_1_search_rule.html#ad7cd1cdc8d59718d075c0d46cdc3d13d">dl::File::SearchRule::_vecFilter</a></div><div class="ttdeci">std::vector< std::string > _vecFilter</div><div class="ttdef"><b>定义</b> <a href="#l00056">dl_file.h:56</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.1
|
|
</small></address>
|
|
</div><!-- doc-content -->
|
|
</body>
|
|
</html>
|