Welcome to mirror list, hosted at ThFree Co, Russian Federation.

namespacellfio__v2__xxx_1_1path__discovery.html - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 088fd69e2764959e3116d632c12f6a960876e8b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LLFIO: llfio_v2_xxx::path_discovery Namespace Reference</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>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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 style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LLFIO
   &#160;<span id="projectnumber">v2.00 late alpha</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('namespacellfio__v2__xxx_1_1path__discovery.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">llfio_v2_xxx::path_discovery Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Contains functions used to discover suitable paths for things.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html">discovered_path</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A discovered path.  <a href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a876db6e58143e730afd0706226f39d6c"><td class="memItemLeft" align="right" valign="top"><a id="a876db6e58143e730afd0706226f39d6c"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;s, const <a class="el" href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html#ae02f172851c050f6a7f5929410428c7d">discovered_path::source_type</a> &amp;v)</td></tr>
<tr class="separator:a876db6e58143e730afd0706226f39d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada0466e529e851d2d58ce87e0e28f4f2"><td class="memItemLeft" align="right" valign="top">span&lt; <a class="el" href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html">discovered_path</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1path__discovery.html#ada0466e529e851d2d58ce87e0e28f4f2">all_temporary_directories</a> (bool refresh=false) noexcept</td></tr>
<tr class="memdesc:ada0466e529e851d2d58ce87e0e28f4f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of potential directories which might be usuable for temporary files.  <a href="#ada0466e529e851d2d58ce87e0e28f4f2">More...</a><br /></td></tr>
<tr class="separator:ada0466e529e851d2d58ce87e0e28f4f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3c4aaa0c413e4989461ab6551058583"><td class="memItemLeft" align="right" valign="top">span&lt; <a class="el" href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html">discovered_path</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1path__discovery.html#ab3c4aaa0c413e4989461ab6551058583">verified_temporary_directories</a> () noexcept</td></tr>
<tr class="memdesc:ab3c4aaa0c413e4989461ab6551058583"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a subset of <code>all_temporary_directories()</code> each of which has been tested to be writable by the current process. No testing is done of available writable space.  <a href="#ab3c4aaa0c413e4989461ab6551058583">More...</a><br /></td></tr>
<tr class="separator:ab3c4aaa0c413e4989461ab6551058583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dd74ea752f3f511d58ccccdcac7f4fd"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1path__discovery.html#a2dd74ea752f3f511d58ccccdcac7f4fd">storage_backed_temporary_files_directory</a> () noexcept</td></tr>
<tr class="memdesc:a2dd74ea752f3f511d58ccccdcac7f4fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to an open handle to a verified temporary directory where files created are stored in a filesystem directory, usually under the current user's quota.  <a href="#a2dd74ea752f3f511d58ccccdcac7f4fd">More...</a><br /></td></tr>
<tr class="separator:a2dd74ea752f3f511d58ccccdcac7f4fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade18f14d3ef37488e8967c87faa04d29"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">memory_backed_temporary_files_directory</a> () noexcept</td></tr>
<tr class="memdesc:ade18f14d3ef37488e8967c87faa04d29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to an open handle to a verified temporary directory where files created are stored in memory/paging file, and thus access may be a lot quicker, but stronger limits on capacity may apply.  <a href="#ade18f14d3ef37488e8967c87faa04d29">More...</a><br /></td></tr>
<tr class="separator:ade18f14d3ef37488e8967c87faa04d29"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Contains functions used to discover suitable paths for things. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ada0466e529e851d2d58ce87e0e28f4f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada0466e529e851d2d58ce87e0e28f4f2">&#9670;&nbsp;</a></span>all_temporary_directories()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">span&lt;<a class="el" href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html">discovered_path</a>&gt; llfio_v2_xxx::path_discovery::all_temporary_directories </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>refresh</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a list of potential directories which might be usuable for temporary files. </p>
<p>This is a fairly lightweight call which builds a master list of all potential temporary file directories given the environment block of this process (unless SUID or SGID or Privilege Elevation are in effect) and the user running this process. It does not verify if any of them exist, or are writable, or anything else about them. An internal mutex is held for the duration of this call.</p>
<dl class="section user"><dt>Memory Allocations</dt><dd>Allocates the master list of discovered temporary directories exactly once per process, unless <code>refresh</code> is true in which case the list will be refreshed. The system calls to retrieve paths may allocate additional memory for paths returned. </dd></dl>
<dl class="section user"><dt>Errors returnable</dt><dd>This call never fails, except to return an empty span. </dd></dl>

</div>
</div>
<a id="ade18f14d3ef37488e8967c87faa04d29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade18f14d3ef37488e8967c87faa04d29">&#9670;&nbsp;</a></span>memory_backed_temporary_files_directory()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a>&amp; llfio_v2_xxx::path_discovery::memory_backed_temporary_files_directory </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a reference to an open handle to a verified temporary directory where files created are stored in memory/paging file, and thus access may be a lot quicker, but stronger limits on capacity may apply. </p>
<p>This is implemented by iterating all of the paths returned by <code>verified_temporary_directories()</code> and checking what file system is in use. The following regex is used:</p>
<p><code>tmpfs|ramfs</code></p>
<p>The handle is created during <code>verified_temporary_directories()</code> and is statically cached thereafter.</p>
<dl class="section note"><dt>Note</dt><dd>If you wish to create an anonymous memory-backed inode for mmap and paging tricks like mapping the same extent into multiple addresses e.g. to implement a constant time zero copy <code>realloc()</code>, strongly consider using a non-file-backed <code>section_handle</code> as this is more portable. </dd></dl>

</div>
</div>
<a id="a2dd74ea752f3f511d58ccccdcac7f4fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dd74ea752f3f511d58ccccdcac7f4fd">&#9670;&nbsp;</a></span>storage_backed_temporary_files_directory()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a>&amp; llfio_v2_xxx::path_discovery::storage_backed_temporary_files_directory </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a reference to an open handle to a verified temporary directory where files created are stored in a filesystem directory, usually under the current user's quota. </p>
<p>This is implemented by iterating all of the paths returned by <code>verified_temporary_directories()</code> and checking what file system is in use. The following regex is used:</p>
<p><code>btrfs|cifs|exfat|ext(2|3|4)|f2fs|hfs|jfs|lxfs|nfs|nilf2|ufs|vfat|xfs|zfs|msdosfs|newnfs|ntfs|smbfs|unionfs|fat|fat32</code></p>
<p>The handle is created during <code>verified_temporary_directories()</code> and is statically cached thereafter. </p>

</div>
</div>
<a id="ab3c4aaa0c413e4989461ab6551058583"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3c4aaa0c413e4989461ab6551058583">&#9670;&nbsp;</a></span>verified_temporary_directories()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">span&lt;<a class="el" href="structllfio__v2__xxx_1_1path__discovery_1_1discovered__path.html">discovered_path</a>&gt; llfio_v2_xxx::path_discovery::verified_temporary_directories </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a subset of <code>all_temporary_directories()</code> each of which has been tested to be writable by the current process. No testing is done of available writable space. </p>
<p>After this call returns, the successfully probed entries returned by <code>all_temporary_directories()</code> will have their stat structure set. As the probing involves creating a non-zero sized file in each possible temporary directory to verify its validity, this is not a fast call. It is however cached statically, so the cost occurs exactly once per process, unless someone calls <code>all_temporary_directories(true)</code> to wipe and refresh the master list. An internal mutex is held for the duration of this call. </p><dl class="section user"><dt>Memory Allocations</dt><dd>None. </dd></dl>
<dl class="section user"><dt>Errors returnable</dt><dd>This call never fails, though if it fails to find any writable temporary directory, it will terminate the process. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacellfio__v2__xxx.html">llfio_v2_xxx</a></li><li class="navelem"><a class="el" href="namespacellfio__v2__xxx_1_1path__discovery.html">path_discovery</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>