blob: f3893743ebfc8352c8d069a51258aba14614660f [file] [log] [blame]
<!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.5"/>
<title>Apache Mesos: 3rdparty/stout/include/stout/internal/windows/reparsepoint.hpp Source File</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="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 style="padding-left: 0.5em;">
<div id="projectname">Apache Mesos
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_aa547de1d719d14adccfca1dfb1735b3.html">stout</a></li><li class="navelem"><a class="el" href="dir_1a1b923d951dd999d43396870333fc33.html">include</a></li><li class="navelem"><a class="el" href="dir_dbd52553d038069c1ed93e3477ea333d.html">stout</a></li><li class="navelem"><a class="el" href="dir_35c8ff4668e5819502b5d29320c39425.html">internal</a></li><li class="navelem"><a class="el" href="dir_3bd05d674f9d85fce6785660a08f69c2.html">windows</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">reparsepoint.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="reparsepoint_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// limitations under the License.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#ifndef __STOUT_INTERNAL_WINDOWS_REPARSEPOINT_HPP__</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __STOUT_INTERNAL_WINDOWS_REPARSEPOINT_HPP__</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="synchronized_8hpp.html">stout/synchronized.hpp</a>&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="try_8hpp.html">stout/try.hpp</a>&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="mkdir_8hpp.html">stout/os/mkdir.hpp</a>&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="realpath_8hpp.html">stout/os/realpath.hpp</a>&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment">// We pass this struct to `DeviceIoControl` to get information about a reparse</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment">// point (including things like whether it&#39;s a symlink). It is normally part of</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment">// the Device Driver Kit (DDK), specifically `nitfs.h`, but rather than taking</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment">// a dependency on the DDK, we choose to simply copy the struct here. This is a</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment">// well-worn path used by Boost FS[1], among others. See documentation</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="comment">// here[2][3].</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment">// [1] http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/src/operations.cpp</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment">// [2] https://msdn.microsoft.com/en-us/library/cc232007.aspx</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment">// [3] https://msdn.microsoft.com/en-us/library/cc232005.aspx</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">// We are declaring this structure (and the REPARSE_DATA_BUFFER_HEADER_SIZE</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// macro right below it in the global namespace, to be consistent with the</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment">// original Windows DDK declarations.</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html"> 41</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__REPARSE__DATA__BUFFER.html">_REPARSE_DATA_BUFFER</a></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;{</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="comment">// Describes, among other things, which type of reparse point this is (e.g.,</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="comment">// a symlink).</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a48f7c20aaa1e9bf48b54bab58c77cee1"> 45</a></span>&#160; ULONG <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a48f7c20aaa1e9bf48b54bab58c77cee1">ReparseTag</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="comment">// Size in bytes of common portion of the `REPARSE_DATA_BUFFER`.</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#ad604064a54502284ae28a5a101855405"> 47</a></span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#ad604064a54502284ae28a5a101855405">ReparseDataLength</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="comment">// Unused. Ignore.</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#ab7d7ef1bac95556ac1ffee0a37e8b6d7"> 49</a></span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#ab7d7ef1bac95556ac1ffee0a37e8b6d7">Reserved</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">union</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; {</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="comment">// Holds symlink data.</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">struct</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; {</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="comment">// Byte offset in `PathBuffer` where the substitute name begins.</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="comment">// Calculated as an offset from 0.</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a4bf3659e29ad08e56bc61b13b7ebb365"> 57</a></span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a4bf3659e29ad08e56bc61b13b7ebb365">SubstituteNameOffset</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">// Length in bytes of the substitute name.</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a0d9fb4ff06825f49157ab7bc296e3635"> 59</a></span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a0d9fb4ff06825f49157ab7bc296e3635">SubstituteNameLength</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="comment">// Byte offset in `PathBuffer` where the print name begins. Calculated as</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="comment">// an offset from 0.</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a2957208cf83448056aff7c03495c8be2"> 62</a></span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a2957208cf83448056aff7c03495c8be2">PrintNameOffset</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="comment">// Length in bytes of the print name.</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a902f8b16d3453a87255901e9fcb2ba9a"> 64</a></span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a902f8b16d3453a87255901e9fcb2ba9a">PrintNameLength</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="comment">// Indicates whether symlink is absolute or relative. If flags containing</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="comment">// `SYMLINK_FLAG_RELATIVE`, then the substitute name is a relative</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="comment">// symlink.</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a9f5b061463f1042c5c12f342b2ff9ef5"> 68</a></span>&#160; ULONG <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a9f5b061463f1042c5c12f342b2ff9ef5">Flags</a>;</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="comment">// The first byte of the path string -- according to the documentation[1],</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="comment">// this is followed in memory by the rest of the path string. The &quot;path</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="comment">// string&quot; itself is a unicode char array containing both substitute name</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="comment">// and print name. They can occur in any order. Use the offset and length</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="comment">// of each in this struct to calculate where each starts and ends.</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="comment">// [1] https://msdn.microsoft.com/en-us/library/windows/hardware/ff552012(v=vs.85).aspx</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#a147ca85ab16ce66bf0a2f0f512e6e2a4"> 76</a></span>&#160; WCHAR <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a147ca85ab16ce66bf0a2f0f512e6e2a4">PathBuffer</a>[1];</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; } <a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="comment">// Unused: holds mount point data.</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keyword">struct</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; {</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a4bf3659e29ad08e56bc61b13b7ebb365">SubstituteNameOffset</a>;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a0d9fb4ff06825f49157ab7bc296e3635">SubstituteNameLength</a>;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a2957208cf83448056aff7c03495c8be2">PrintNameOffset</a>;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; USHORT <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a902f8b16d3453a87255901e9fcb2ba9a">PrintNameLength</a>;</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; WCHAR <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a147ca85ab16ce66bf0a2f0f512e6e2a4">PathBuffer</a>[1];</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; } <a class="code" href="struct__REPARSE__DATA__BUFFER.html#a0a938258f54cb4c97f6b2b2fed22293f">MountPointReparseBuffer</a>;</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keyword">struct</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; {</div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="struct__REPARSE__DATA__BUFFER.html#af423e2edcd34b951786b33f1461ffc6d"> 90</a></span>&#160; UCHAR <a class="code" href="struct__REPARSE__DATA__BUFFER.html#af423e2edcd34b951786b33f1461ffc6d">DataBuffer</a>[1];</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; } <a class="code" href="struct__REPARSE__DATA__BUFFER.html#af73998fb98b08ca499b1f9b7a899b832">GenericReparseBuffer</a>;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; };</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;} <a class="code" href="reparsepoint_8hpp.html#a1d08355d52e71e6efbb50209f472c3e5">REPARSE_DATA_BUFFER</a>;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="reparsepoint_8hpp.html#af89fc9f12f332fdc47c7268384bd1d8f"> 95</a></span>&#160;<span class="preprocessor">#define REPARSE_DATA_BUFFER_HEADER_SIZE \</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="preprocessor"> FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="keyword">namespace </span>internal {</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html"> 99</a></span>&#160;<span class="keyword">namespace </span>windows {</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="comment">// Convenience struct for holding symlink data, meant purely for internal use.</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="comment">// We pass this around instead of the `REPARSE_DATA_BUFFER` struct, simply</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="comment">// because this struct is easier to deal with and reason about.</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structinternal_1_1windows_1_1SymbolicLink.html"> 104</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structinternal_1_1windows_1_1SymbolicLink.html">SymbolicLink</a></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;{</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structinternal_1_1windows_1_1SymbolicLink.html#a46106b565c75b06e6bc8332c58ae9484"> 106</a></span>&#160; std::wstring <a class="code" href="structinternal_1_1windows_1_1SymbolicLink.html#a46106b565c75b06e6bc8332c58ae9484">substitute_name</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="structinternal_1_1windows_1_1SymbolicLink.html#a7ca6332f2c62622fdf6a8340989fb837"> 107</a></span>&#160; std::wstring <a class="code" href="structinternal_1_1windows_1_1SymbolicLink.html#a7ca6332f2c62622fdf6a8340989fb837">print_name</a>;</div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="structinternal_1_1windows_1_1SymbolicLink.html#a89e2e286624560540be6ad3c2ca484f8"> 108</a></span>&#160; ULONG <a class="code" href="structinternal_1_1windows_1_1SymbolicLink.html#a89e2e286624560540be6ad3c2ca484f8">flags</a>;</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;};</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="comment">// Checks file/folder attributes for a path to see if the reparse point</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="comment">// attribute is set; this indicates whether the path points at a reparse point,</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="comment">// rather than a &quot;normal&quot; file or folder.</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#ab48abfb7e70b90bcd8ff4047cf53ac83"> 115</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classTry.html">Try&lt;bool&gt;</a> <a class="code" href="namespaceinternal_1_1windows.html#ab48abfb7e70b90bcd8ff4047cf53ac83">reparse_point_attribute_set</a>(<span class="keyword">const</span> std::string&amp; absolute_path)</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;{</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keyword">const</span> DWORD attributes = ::GetFileAttributes(absolute_path.c_str());</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordflow">if</span> (attributes == INVALID_FILE_ATTRIBUTES) {</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="stringliteral">&quot;Failed to get attributes for file &#39;&quot;</span> + absolute_path + <span class="stringliteral">&quot;&#39;&quot;</span>);</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; }</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="keywordflow">return</span> (attributes &amp; FILE_ATTRIBUTE_REPARSE_POINT) != 0;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;}</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="comment">// Attempts to extract symlink data out of a `REPARSE_DATA_BUFFER` (which could</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment">// hold other things, e.g., mount point data).</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#afd9a4ce68b9e02355cf2a92c49828081"> 129</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classTry.html">Try&lt;SymbolicLink&gt;</a> <a class="code" href="namespaceinternal_1_1windows.html#afd9a4ce68b9e02355cf2a92c49828081">build_symbolic_link</a>(<span class="keyword">const</span> <a class="code" href="struct__REPARSE__DATA__BUFFER.html">REPARSE_DATA_BUFFER</a>&amp; data)</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;{</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> is_symLink = (data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#a48f7c20aaa1e9bf48b54bab58c77cee1">ReparseTag</a> &amp; IO_REPARSE_TAG_SYMLINK) != 0;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">if</span> (!is_symLink) {</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(<span class="stringliteral">&quot;Data buffer is not a symlink&quot;</span>);</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; }</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="comment">// NOTE: This buffer is not null terminated.</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keyword">const</span> WCHAR* substitute_name =</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.PathBuffer +</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.SubstituteNameOffset / <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> substitute_name_length =</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.SubstituteNameLength / <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="comment">// NOTE: This buffer is not null terminated.</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keyword">const</span> WCHAR* print_name =</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.PathBuffer +</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.PrintNameOffset / <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> print_name_length =</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.PrintNameLength / <span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keywordflow">return</span> <a class="code" href="structinternal_1_1windows_1_1SymbolicLink.html">SymbolicLink</a>{</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; std::wstring(substitute_name, substitute_name_length),</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; std::wstring(print_name, print_name_length),</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; data.<a class="code" href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">SymbolicLinkReparseBuffer</a>.Flags};</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;}</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="comment">// Attempts to get a file or folder handle for an absolute path, and does not</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="comment">// follow symlinks. That is, if the path points at a symlink, the handle will</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;<span class="comment">// refer to the symlink rather than the file or folder the symlink points at.</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#a8ee4f75d803d8ed56ce760d8e1dfac14"> 160</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classTry.html">Try&lt;SharedHandle&gt;</a> <a class="code" href="namespaceinternal_1_1windows.html#a8ee4f75d803d8ed56ce760d8e1dfac14">get_handle_no_follow</a>(<span class="keyword">const</span> std::string&amp; absolute_path)</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;{</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keyword">struct </span>_stat absolute_path_stat;</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordtype">bool</span> resolved_path_is_directory = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordflow">if</span> (::_stat(absolute_path.c_str(), &amp;absolute_path_stat) == 0) {</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; resolved_path_is_directory = <a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#abc71c1741c013cc1f2fb33c5e1e6f139">S_ISDIR</a>(absolute_path_stat.st_mode);</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classErrnoError.html">ErrnoError</a>(<span class="stringliteral">&quot;&#39;_stat&#39; failed on path &#39;&quot;</span> + absolute_path + <span class="stringliteral">&quot;&#39;&quot;</span>);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; }</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// NOTE: According to the `CreateFile` documentation[1], the `OPEN_EXISTING`</span></div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// and `FILE_FLAG_OPEN_REPARSE_POINT` flags need to be used when getting a</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// handle for the symlink.</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// Note also that `CreateFile` will appropriately generate a handle for</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// either a folder or a file, as long as the appropriate flag is being set:</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// `FILE_FLAG_BACKUP_SEMANTICS` or `FILE_FLAG_OPEN_REPARSE_POINT`.</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="comment">// The `FILE_FLAG_BACKUP_SEMANTICS` flag is being set whenever the target is</span></div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="comment">// a directory. According to MSDN[1]: &quot;You must set this flag to obtain a</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="comment">// handle to a directory. A directory handle can be passed to some functions</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// instead of a file handle&quot;. More `FILE_FLAG_BACKUP_SEMANTICS` documentation</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="comment">// can be found in MSDN[2].</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// The `GENERIC_READ` flag is being used because it&#39;s the most common way of</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="comment">// opening a file for reading only. The `FILE_SHARE_READ` allows other</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="comment">// processes to read the file at the same time. MSDN[1] provides a more</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="comment">// detailed explanation of these flags.</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="comment">// [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx</span></div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="comment">// [2] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364399(v=vs.85).aspx</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">const</span> DWORD access_flags = resolved_path_is_directory</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; ? (FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS)</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; : FILE_FLAG_OPEN_REPARSE_POINT;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a> handle = ::CreateFile(</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; absolute_path.c_str(),</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; GENERIC_READ, <span class="comment">// Open the file for reading only.</span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; FILE_SHARE_READ, <span class="comment">// Just reading this file, allow others to do the same.</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keyword">nullptr</span>, <span class="comment">// Ignored.</span></div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; OPEN_EXISTING, <span class="comment">// Open existing symlink.</span></div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; access_flags, <span class="comment">// Open symlink, not the file it points to.</span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keyword">nullptr</span>); <span class="comment">// Ignored.</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="keywordflow">if</span> (handle == INVALID_HANDLE_VALUE) {</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="stringliteral">&quot;&#39;internal::windows::get_handle_no_follow&#39;: &#39;CreateFile&#39; call failed &quot;</span></div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="stringliteral">&quot;at path &#39;&quot;</span> + absolute_path + <span class="stringliteral">&quot;&#39;&quot;</span>);</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; }</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classSharedHandle.html">SharedHandle</a>(handle, CloseHandle);</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;}</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;<span class="comment">// Attempts to get the symlink data for a file or folder handle.</span></div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#a85f7e5d0197eeb93bde525379b8e14d6"> 215</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classTry.html">Try&lt;SymbolicLink&gt;</a> <a class="code" href="namespaceinternal_1_1windows.html#a85f7e5d0197eeb93bde525379b8e14d6">get_symbolic_link_data</a>(<span class="keyword">const</span> <a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a> handle)</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;{</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="comment">// To get the symlink data, we call `DeviceIoControl`. This function is part</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="comment">// of the Device Driver Kit (DDK)[1] and, along with `FSCTL_GET_REPARSE_POINT`</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="comment">// is used to emit information about reparse points (and, thus, symlinks,</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// since symlinks are implemented with reparse points). This technique is</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="comment">// being used in Boost FS code as well[2].</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="comment">// Summarized, the documentation tells us that we need to pass in</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="comment">// `FSCTL_GET_REPARSE_POINT` to get the function to populate a</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="comment">// `REPARSE_DATA_BUFFER` struct with data about a reparse point.</span></div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="comment">// The `REPARSE_DATA_BUFFER` struct is defined in a DDK header file,</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="comment">// so to avoid bringing in a multitude of DDK headers we take a cue from</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="comment">// Boost FS, and copy the struct into this header (see above).</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="comment">// Finally, for context, it may be worth looking at the MSDN</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="comment">// documentation[3] for `DeviceIoControl` itself.</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="comment">// [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364571(v=vs.85).aspx</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="comment">// [2] https://svn.boost.org/trac/boost/ticket/4663</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="comment">// [3] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363216(v=vs.85).aspx</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> reparse_point_data_size = MAXIMUM_REPARSE_DATA_BUFFER_SIZE;</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; BYTE buffer[reparse_point_data_size];</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <a class="code" href="struct__REPARSE__DATA__BUFFER.html">REPARSE_DATA_BUFFER</a>* reparse_point_data =</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="keyword">reinterpret_cast&lt;</span><a class="code" href="struct__REPARSE__DATA__BUFFER.html">REPARSE_DATA_BUFFER</a>*<span class="keyword">&gt;</span>(buffer);</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; DWORD ignored = 0;</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="comment">// The semantics of this function are: get the reparse data associated with</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="comment">// the `handle` of some open directory or file, and that data in</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="comment">// `reparse_point_data`.</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keyword">const</span> BOOL reparse_data_obtained = ::DeviceIoControl(</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; handle, <span class="comment">// Handle to file or directory.</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; FSCTL_GET_REPARSE_POINT, <span class="comment">// Gets reparse point data for file/folder.</span></div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="keyword">nullptr</span>, <span class="comment">// Ignored.</span></div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; 0, <span class="comment">// Ignored.</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; reparse_point_data,</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; reparse_point_data_size,</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; &amp;ignored, <span class="comment">// Ignored.</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="keyword">nullptr</span>); <span class="comment">// Ignored.</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="keywordflow">if</span> (!reparse_data_obtained) {</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="stringliteral">&quot;&#39;internal::windows::get_symbolic_link_data&#39;: &#39;DeviceIoControl&#39; call &quot;</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="stringliteral">&quot;failed&quot;</span>);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; }</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespaceinternal_1_1windows.html#afd9a4ce68b9e02355cf2a92c49828081">build_symbolic_link</a>(*reparse_point_data);</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;}</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;<span class="comment">// Creates a reparse point with the specified target. The target can be either</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;<span class="comment">// a file (in which case a junction is created), or a folder (in which case a</span></div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;<span class="comment">// mount point is created).</span></div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;<span class="comment">// Calling this function results in a temporary elevation of the process token&#39;s</span></div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;<span class="comment">// privileges (if those privileges are not already held), to allow for junction</span></div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;<span class="comment">// or mount point creation. This operation is gated by a static mutex, which</span></div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<span class="comment">// makes it thread-safe.</span></div>
<div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#aeb3eff223f2ea4c2899bcc82d8818334"> 274</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classTry.html">Try&lt;Nothing&gt;</a> <a class="code" href="namespaceinternal_1_1windows.html#aeb3eff223f2ea4c2899bcc82d8818334">create_symbolic_link</a>(</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keyword">const</span> std::string&amp; target,</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keyword">const</span> std::string&amp; reparse_point)</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;{</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="comment">// Normalize input paths.</span></div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <span class="keyword">const</span> <a class="code" href="classResult.html">Result&lt;std::string&gt;</a> real_reparse_point_path =</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <a class="code" href="namespaceos.html#a7fd21154b15bc00e31e2b457cab83ff2">os::realpath</a>(reparse_point);</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <span class="keyword">const</span> <a class="code" href="classResult.html">Result&lt;std::string&gt;</a> real_target_path = <a class="code" href="namespaceos.html#a7fd21154b15bc00e31e2b457cab83ff2">os::realpath</a>(target);</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="keywordflow">if</span> (!real_reparse_point_path.<a class="code" href="classResult.html#a85eaa52037223d71092e65701c166562">isSome</a>()) {</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="stringliteral">&quot;Failed to get realpath for &#39;&quot;</span> +</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; reparse_point + <span class="stringliteral">&quot;&#39;: &quot;</span> + (real_reparse_point_path.<a class="code" href="classResult.html#aeca16ad17d299ad885c9b46c83b12a3d">isError</a>() ?</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; real_reparse_point_path.<a class="code" href="classResult.html#a521adf96f5c27d26d6b1d580aae8aaee">error</a>() : <span class="stringliteral">&quot;No such directory&quot;</span>));</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; }</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <span class="keywordflow">if</span> (!real_target_path.<a class="code" href="classResult.html#a85eaa52037223d71092e65701c166562">isSome</a>()) {</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <span class="stringliteral">&quot;Failed to get realpath for &#39;&quot;</span> +</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; target + <span class="stringliteral">&quot;&#39;: &quot;</span> + (real_target_path.<a class="code" href="classResult.html#aeca16ad17d299ad885c9b46c83b12a3d">isError</a>() ?</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; real_target_path.<a class="code" href="classResult.html#a521adf96f5c27d26d6b1d580aae8aaee">error</a>() : <span class="stringliteral">&quot;No such directory&quot;</span>));</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; }</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keyword">const</span> std::string&amp; absolute_target_path = real_target_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>();</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="comment">// Determine if target is a folder or a file. This makes a difference</span></div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <span class="comment">// in the way we call `create_symbolic_link`.</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="keyword">struct </span>_stat absolute_target_path_stat;</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <span class="keywordflow">if</span> (::_stat(absolute_target_path.c_str(), &amp;absolute_target_path_stat) != 0) {</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classErrnoError.html">ErrnoError</a>(<span class="stringliteral">&quot;&#39;_stat&#39; failed on path &#39;&quot;</span> + absolute_target_path + <span class="stringliteral">&quot;&#39;&quot;</span>);</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; }</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> target_is_folder = <a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#abc71c1741c013cc1f2fb33c5e1e6f139">S_ISDIR</a>(absolute_target_path_stat.st_mode);</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160;</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <span class="comment">// Bail out if target is already a reparse point.</span></div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <a class="code" href="classTry.html">Try&lt;bool&gt;</a> attribute_set = <a class="code" href="namespaceinternal_1_1windows.html#ab48abfb7e70b90bcd8ff4047cf53ac83">reparse_point_attribute_set</a>(absolute_target_path);</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keywordflow">if</span> (!attribute_set.<a class="code" href="classTry.html#a6543d7d5db4f298bcd673bf3cd509acc">isSome</a>()) {</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="stringliteral">&quot;Could not get reparse point attribute for &#39;&quot;</span> + absolute_target_path +</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; <span class="stringliteral">&quot;&#39;&quot;</span> + (attribute_set.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>() ? <span class="stringliteral">&quot;: &quot;</span> + attribute_set.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>() : <span class="stringliteral">&quot;&quot;</span>));</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; }</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; <span class="keywordflow">if</span> (attribute_set.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>()) {</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <span class="stringliteral">&quot;Path &#39;&quot;</span> + absolute_target_path + <span class="stringliteral">&quot;&#39; is already a reparse point&quot;</span>);</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; }</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="comment">// `CreateSymbolicLink` adjusts the process token&#39;s privileges to allow for</span></div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; <span class="comment">// symlink creation. MSDN[1] makes no guarantee when it comes to the thread</span></div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="comment">// safety of this operation, so we are making use of a mutex to prevent</span></div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <span class="comment">// multiple concurrent calls.</span></div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; <span class="comment">//</span></div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; <span class="comment">// [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx</span></div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="keyword">static</span> std::mutex adjust_privileges_mutex;</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="keyword">synchronized</span>(adjust_privileges_mutex) {</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <span class="keywordflow">if</span> (!::CreateSymbolicLink(</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; reparse_point.c_str(), <span class="comment">// path to the symbolic link</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; target.c_str(), <span class="comment">// symlink target</span></div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; target_is_folder ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0)) {</div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(</div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <span class="stringliteral">&quot;&#39;internal::windows::create_symbolic_link&#39;: &#39;CreateSymbolicLink&#39; &quot;</span></div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; <span class="stringliteral">&quot;call failed&quot;</span>);</div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; }</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; }</div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <span class="keywordflow">return</span> <a class="code" href="structNothing.html">Nothing</a>();</div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;}</div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160;</div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;} <span class="comment">// namespace windows {</span></div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160;} <span class="comment">// namespace internal {</span></div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;</div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;<span class="preprocessor">#endif // __STOUT_INTERNAL_WINDOWS_REPARSEPOINT_HPP__</span></div>
<div class="ttc" id="synchronized_8hpp_html"><div class="ttname"><a href="synchronized_8hpp.html">synchronized.hpp</a></div></div>
<div class="ttc" id="namespaceinternal_1_1windows_html_a8ee4f75d803d8ed56ce760d8e1dfac14"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a8ee4f75d803d8ed56ce760d8e1dfac14">internal::windows::get_handle_no_follow</a></div><div class="ttdeci">Try&lt; SharedHandle &gt; get_handle_no_follow(const std::string &amp;absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:160</div></div>
<div class="ttc" id="realpath_8hpp_html"><div class="ttname"><a href="realpath_8hpp.html">realpath.hpp</a></div></div>
<div class="ttc" id="structNothing_html"><div class="ttname"><a href="structNothing.html">Nothing</a></div><div class="ttdef"><b>Definition:</b> nothing.hpp:16</div></div>
<div class="ttc" id="classError_html"><div class="ttname"><a href="classError.html">Error</a></div><div class="ttdef"><b>Definition:</b> errorbase.hpp:35</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_ab7d7ef1bac95556ac1ffee0a37e8b6d7"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#ab7d7ef1bac95556ac1ffee0a37e8b6d7">_REPARSE_DATA_BUFFER::Reserved</a></div><div class="ttdeci">USHORT Reserved</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:49</div></div>
<div class="ttc" id="3rdparty_2stout_2include_2stout_2windows_8hpp_html_abc71c1741c013cc1f2fb33c5e1e6f139"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#abc71c1741c013cc1f2fb33c5e1e6f139">S_ISDIR</a></div><div class="ttdeci">bool S_ISDIR(const int mode)</div><div class="ttdef"><b>Definition:</b> windows.hpp:190</div></div>
<div class="ttc" id="classSharedHandle_html"><div class="ttname"><a href="classSharedHandle.html">SharedHandle</a></div><div class="ttdef"><b>Definition:</b> windows.hpp:54</div></div>
<div class="ttc" id="classTry_html"><div class="ttname"><a href="classTry.html">Try</a></div><div class="ttdef"><b>Definition:</b> try.hpp:34</div></div>
<div class="ttc" id="classResult_html_a521adf96f5c27d26d6b1d580aae8aaee"><div class="ttname"><a href="classResult.html#a521adf96f5c27d26d6b1d580aae8aaee">Result::error</a></div><div class="ttdeci">static Result&lt; T &gt; error(const std::string &amp;message)</div><div class="ttdef"><b>Definition:</b> result.hpp:53</div></div>
<div class="ttc" id="reparsepoint_8hpp_html_a1d08355d52e71e6efbb50209f472c3e5"><div class="ttname"><a href="reparsepoint_8hpp.html#a1d08355d52e71e6efbb50209f472c3e5">REPARSE_DATA_BUFFER</a></div><div class="ttdeci">struct _REPARSE_DATA_BUFFER REPARSE_DATA_BUFFER</div></div>
<div class="ttc" id="classWindowsError_html"><div class="ttname"><a href="classWindowsError.html">WindowsError</a></div><div class="ttdef"><b>Definition:</b> error.hpp:105</div></div>
<div class="ttc" id="classErrnoError_html"><div class="ttname"><a href="classErrnoError.html">ErrnoError</a></div><div class="ttdef"><b>Definition:</b> errorbase.hpp:44</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a2957208cf83448056aff7c03495c8be2"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a2957208cf83448056aff7c03495c8be2">_REPARSE_DATA_BUFFER::PrintNameOffset</a></div><div class="ttdeci">USHORT PrintNameOffset</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:62</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_af73998fb98b08ca499b1f9b7a899b832"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#af73998fb98b08ca499b1f9b7a899b832">_REPARSE_DATA_BUFFER::GenericReparseBuffer</a></div><div class="ttdeci">struct _REPARSE_DATA_BUFFER::@12::@16 GenericReparseBuffer</div></div>
<div class="ttc" id="structinternal_1_1windows_1_1SymbolicLink_html_a7ca6332f2c62622fdf6a8340989fb837"><div class="ttname"><a href="structinternal_1_1windows_1_1SymbolicLink.html#a7ca6332f2c62622fdf6a8340989fb837">internal::windows::SymbolicLink::print_name</a></div><div class="ttdeci">std::wstring print_name</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:107</div></div>
<div class="ttc" id="3rdparty_2stout_2include_2stout_2windows_8hpp_html"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">windows.hpp</a></div></div>
<div class="ttc" id="classResult_html"><div class="ttname"><a href="classResult.html">Result</a></div><div class="ttdef"><b>Definition:</b> result.hpp:40</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a147ca85ab16ce66bf0a2f0f512e6e2a4"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a147ca85ab16ce66bf0a2f0f512e6e2a4">_REPARSE_DATA_BUFFER::PathBuffer</a></div><div class="ttdeci">WCHAR PathBuffer[1]</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:76</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a48f7c20aaa1e9bf48b54bab58c77cee1"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a48f7c20aaa1e9bf48b54bab58c77cee1">_REPARSE_DATA_BUFFER::ReparseTag</a></div><div class="ttdeci">ULONG ReparseTag</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:45</div></div>
<div class="ttc" id="namespaceinternal_1_1windows_html_afd9a4ce68b9e02355cf2a92c49828081"><div class="ttname"><a href="namespaceinternal_1_1windows.html#afd9a4ce68b9e02355cf2a92c49828081">internal::windows::build_symbolic_link</a></div><div class="ttdeci">Try&lt; SymbolicLink &gt; build_symbolic_link(const REPARSE_DATA_BUFFER &amp;data)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:129</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a0d9fb4ff06825f49157ab7bc296e3635"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a0d9fb4ff06825f49157ab7bc296e3635">_REPARSE_DATA_BUFFER::SubstituteNameLength</a></div><div class="ttdeci">USHORT SubstituteNameLength</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:59</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_af423e2edcd34b951786b33f1461ffc6d"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#af423e2edcd34b951786b33f1461ffc6d">_REPARSE_DATA_BUFFER::DataBuffer</a></div><div class="ttdeci">UCHAR DataBuffer[1]</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:90</div></div>
<div class="ttc" id="namespaceinternal_1_1windows_html_a85f7e5d0197eeb93bde525379b8e14d6"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a85f7e5d0197eeb93bde525379b8e14d6">internal::windows::get_symbolic_link_data</a></div><div class="ttdeci">Try&lt; SymbolicLink &gt; get_symbolic_link_data(const HANDLE handle)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:215</div></div>
<div class="ttc" id="nothing_8hpp_html"><div class="ttname"><a href="nothing_8hpp.html">nothing.hpp</a></div></div>
<div class="ttc" id="namespacerouting_1_1queueing_1_1ingress_html_a934208b6017d0a9aed90b6594bb8292f"><div class="ttname"><a href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">routing::queueing::ingress::HANDLE</a></div><div class="ttdeci">constexpr Handle HANDLE</div><div class="ttdef"><b>Definition:</b> ingress.hpp:37</div></div>
<div class="ttc" id="structinternal_1_1windows_1_1SymbolicLink_html_a89e2e286624560540be6ad3c2ca484f8"><div class="ttname"><a href="structinternal_1_1windows_1_1SymbolicLink.html#a89e2e286624560540be6ad3c2ca484f8">internal::windows::SymbolicLink::flags</a></div><div class="ttdeci">ULONG flags</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:108</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a9f5b061463f1042c5c12f342b2ff9ef5"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a9f5b061463f1042c5c12f342b2ff9ef5">_REPARSE_DATA_BUFFER::Flags</a></div><div class="ttdeci">ULONG Flags</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:68</div></div>
<div class="ttc" id="classTry_html_a6543d7d5db4f298bcd673bf3cd509acc"><div class="ttname"><a href="classTry.html#a6543d7d5db4f298bcd673bf3cd509acc">Try::isSome</a></div><div class="ttdeci">bool isSome() const </div><div class="ttdef"><b>Definition:</b> try.hpp:70</div></div>
<div class="ttc" id="structinternal_1_1windows_1_1SymbolicLink_html_a46106b565c75b06e6bc8332c58ae9484"><div class="ttname"><a href="structinternal_1_1windows_1_1SymbolicLink.html#a46106b565c75b06e6bc8332c58ae9484">internal::windows::SymbolicLink::substitute_name</a></div><div class="ttdeci">std::wstring substitute_name</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:106</div></div>
<div class="ttc" id="mkdir_8hpp_html"><div class="ttname"><a href="mkdir_8hpp.html">mkdir.hpp</a></div></div>
<div class="ttc" id="classResult_html_aedf79f3b14dcda5791b84a64ada4d412"><div class="ttname"><a href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">Result::get</a></div><div class="ttdeci">const T &amp; get() const </div><div class="ttdef"><b>Definition:</b> result.hpp:112</div></div>
<div class="ttc" id="classTry_html_aec4a11ddd3c036e889d90b7eb6258ba7"><div class="ttname"><a href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">Try::error</a></div><div class="ttdeci">static Try error(const E &amp;e)</div><div class="ttdef"><b>Definition:</b> try.hpp:42</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_ad604064a54502284ae28a5a101855405"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#ad604064a54502284ae28a5a101855405">_REPARSE_DATA_BUFFER::ReparseDataLength</a></div><div class="ttdeci">USHORT ReparseDataLength</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:47</div></div>
<div class="ttc" id="classTry_html_a0b98f95163b8a38daafd1651b043a276"><div class="ttname"><a href="classTry.html#a0b98f95163b8a38daafd1651b043a276">Try::isError</a></div><div class="ttdeci">bool isError() const </div><div class="ttdef"><b>Definition:</b> try.hpp:71</div></div>
<div class="ttc" id="try_8hpp_html"><div class="ttname"><a href="try_8hpp.html">try.hpp</a></div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html">_REPARSE_DATA_BUFFER</a></div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:41</div></div>
<div class="ttc" id="structinternal_1_1windows_1_1SymbolicLink_html"><div class="ttname"><a href="structinternal_1_1windows_1_1SymbolicLink.html">internal::windows::SymbolicLink</a></div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:104</div></div>
<div class="ttc" id="classResult_html_a85eaa52037223d71092e65701c166562"><div class="ttname"><a href="classResult.html#a85eaa52037223d71092e65701c166562">Result::isSome</a></div><div class="ttdeci">bool isSome() const </div><div class="ttdef"><b>Definition:</b> result.hpp:108</div></div>
<div class="ttc" id="classResult_html_aeca16ad17d299ad885c9b46c83b12a3d"><div class="ttname"><a href="classResult.html#aeca16ad17d299ad885c9b46c83b12a3d">Result::isError</a></div><div class="ttdeci">bool isError() const </div><div class="ttdef"><b>Definition:</b> result.hpp:110</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_af4e8909d5719d9dec40a3ae6237dacc9"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#af4e8909d5719d9dec40a3ae6237dacc9">_REPARSE_DATA_BUFFER::SymbolicLinkReparseBuffer</a></div><div class="ttdeci">struct _REPARSE_DATA_BUFFER::@12::@14 SymbolicLinkReparseBuffer</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a4bf3659e29ad08e56bc61b13b7ebb365"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a4bf3659e29ad08e56bc61b13b7ebb365">_REPARSE_DATA_BUFFER::SubstituteNameOffset</a></div><div class="ttdeci">USHORT SubstituteNameOffset</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:57</div></div>
<div class="ttc" id="namespaceinternal_1_1windows_html_aeb3eff223f2ea4c2899bcc82d8818334"><div class="ttname"><a href="namespaceinternal_1_1windows.html#aeb3eff223f2ea4c2899bcc82d8818334">internal::windows::create_symbolic_link</a></div><div class="ttdeci">Try&lt; Nothing &gt; create_symbolic_link(const std::string &amp;target, const std::string &amp;reparse_point)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:274</div></div>
<div class="ttc" id="classTry_html_a7be0768038e0628632492edf6cc1515a"><div class="ttname"><a href="classTry.html#a7be0768038e0628632492edf6cc1515a">Try::get</a></div><div class="ttdeci">const T &amp; get() const </div><div class="ttdef"><b>Definition:</b> try.hpp:73</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a902f8b16d3453a87255901e9fcb2ba9a"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a902f8b16d3453a87255901e9fcb2ba9a">_REPARSE_DATA_BUFFER::PrintNameLength</a></div><div class="ttdeci">USHORT PrintNameLength</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:64</div></div>
<div class="ttc" id="struct__REPARSE__DATA__BUFFER_html_a0a938258f54cb4c97f6b2b2fed22293f"><div class="ttname"><a href="struct__REPARSE__DATA__BUFFER.html#a0a938258f54cb4c97f6b2b2fed22293f">_REPARSE_DATA_BUFFER::MountPointReparseBuffer</a></div><div class="ttdeci">struct _REPARSE_DATA_BUFFER::@12::@15 MountPointReparseBuffer</div></div>
<div class="ttc" id="namespaceinternal_1_1windows_html_ab48abfb7e70b90bcd8ff4047cf53ac83"><div class="ttname"><a href="namespaceinternal_1_1windows.html#ab48abfb7e70b90bcd8ff4047cf53ac83">internal::windows::reparse_point_attribute_set</a></div><div class="ttdeci">Try&lt; bool &gt; reparse_point_attribute_set(const std::string &amp;absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:115</div></div>
<div class="ttc" id="namespaceos_html_a7fd21154b15bc00e31e2b457cab83ff2"><div class="ttname"><a href="namespaceos.html#a7fd21154b15bc00e31e2b457cab83ff2">os::realpath</a></div><div class="ttdeci">Result&lt; std::string &gt; realpath(const std::string &amp;path)</div><div class="ttdef"><b>Definition:</b> realpath.hpp:26</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>