http://git-wip-us.apache.org/repos/asf/mesos-site/blob/30b7fa50/content/api/latest/c++/symlink_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/symlink_8hpp_source.html b/content/api/latest/c++/symlink_8hpp_source.html index b45217c..8f236f4 100644 --- a/content/api/latest/c++/symlink_8hpp_source.html +++ b/content/api/latest/c++/symlink_8hpp_source.html @@ -75,91 +75,121 @@ <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <<a class="code" href="longpath_8hpp.html">stout/internal/windows/longpath.hpp</a>></span></div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <<a class="code" href="reparsepoint_8hpp.html">stout/internal/windows/reparsepoint.hpp</a>></span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div> -<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="realpath_8hpp.html">stout/os/realpath.hpp</a>></span></div> -<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> -<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div> -<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span>internal {</div> -<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span>windows {</div> -<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div> -<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// Gets symlink data for a given path, if it exists.</span></div> -<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">//</span></div> -<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// This turns out to be a very complicated task on Windows. The gist of it is</span></div> -<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// that we know that symlinks on Windows are implemented with the Reparse Point</span></div> -<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// API, and so the process is a matter of:</span></div> -<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">//</span></div> -<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// 1. Checking whether the attributes for the file/folder specified by the</span></div> -<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// path have the reparse point bit set; all symlinks are implemented with</span></div> -<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// reparse points, so this bit should be on all symlinks.</span></div> -<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// 2. Opening a file/folder handle for that path, instructing it specifically</span></div> -<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// to open a handle for the symlink (if the path points at a symlink) and</span></div> -<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// *not* the file the symlink points at (as is the default). Note that</span></div> -<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment">// file and folder handles are different, so we have a function that</span></div> -<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// chooses appropriately.</span></div> -<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// 3. Using `DeviceIoControl` to obtain information about the handle for this</span></div> -<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment">// reparse point, which we can then query to figure out if it's a reparse</span></div> -<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment">// point that is owned by the symlink filesystem filter driver.</span></div> -<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">// 4. If it is, then we report that this path does point at a symlink.</span></div> -<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment">//</span></div> -<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// NOTE: it may be helpful to consult the documentation for each of these</span></div> -<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// functions, as they give you sources that justify the arguments to the</span></div> -<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// obscure APIs we call to get this all working.</span></div> -<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#a39ca8fa0643b489f6bef951bef207c92"> 52</a></span> <span class="keyword">inline</span> <a class="code" href="classTry.html">Try<SymbolicLink></a> <a class="code" href="namespaceinternal_1_1windows.html#a39ca8fa0643b489f6bef951bef207c92">query_symbolic_link_data</a>(<span class="keyword">const</span> std::string& path)</div> -<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> {</div> -<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// Convert to absolute path because Windows APIs expect it.</span></div> -<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">const</span> <a class="code" href="classResult.html">Result<std::string></a> absolute_path = <a class="code" href="namespaceos.html#aa533c79d98af12b40b567a851e442373">os::realpath</a>(path);</div> -<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">if</span> (!absolute_path.<a class="code" href="classResult.html#a85eaa52037223d71092e65701c166562">isSome</a>()) {</div> -<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(absolute_path.<a class="code" href="classResult.html#a521adf96f5c27d26d6b1d580aae8aaee">error</a>());</div> -<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div> -<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div> -<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">// Windows has no built-in way to tell whether a path points at a symbolic</span></div> -<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// link; but, we know that symbolic links are implemented with reparse</span></div> -<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="comment">// points, so we begin by checking that.</span></div> -<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="classTry.html">Try<bool></a> is_reparse_point = <a class="code" href="namespaceinternal_1_1windows.html#a9205fe9be7dc028375cd24338483152b">reparse_point_attribute_set</a>(</div> -<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  ::<a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">internal::windows::longpath</a>(absolute_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>()));</div> -<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div> -<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span> (is_reparse_point.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div> -<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(is_reparse_point.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div> -<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!is_reparse_point.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>()) {</div> -<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div> -<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="stringliteral">"Reparse point attribute is not set for path '"</span> + absolute_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>() +</div> -<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="stringliteral">"', and therefore it is not a symbolic link"</span>);</div> -<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div> -<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div> -<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keyword">const</span> <a class="code" href="classTry.html">Try<SharedHandle></a> symlink_handle =</div> -<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="namespaceinternal_1_1windows.html#a8ee4f75d803d8ed56ce760d8e1dfac14">get_handle_no_follow</a>(absolute_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>());</div> -<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div> -<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">if</span> (symlink_handle.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div> -<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(symlink_handle.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div> -<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div> -<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div> -<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">// Finally, retrieve symlink data for the handle, if any.</span></div> -<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceinternal_1_1windows.html#a85f7e5d0197eeb93bde525379b8e14d6">get_symbolic_link_data</a>(symlink_handle.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>().<a class="code" href="classSharedHandle.html#a800385e17e17cb826147968e748fd8fa">get_handle</a>());</div> -<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> }</div> -<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div> -<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> } <span class="comment">// namespace windows {</span></div> -<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> } <span class="comment">// namespace internal {</span></div> -<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div> -<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor">#endif // __STOUT_INTERNAL_WINDOWS_SYMLINK_HPP__</span></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< SharedHandle > get_handle_no_follow(const std::string &absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:180</div></div> -<div class="ttc" id="realpath_8hpp_html"><div class="ttname"><a href="realpath_8hpp.html">realpath.hpp</a></div></div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">namespace </span>internal {</div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">namespace </span>windows {</div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// Get the full / absolute path. Does not check for existence, and does not</span></div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment">// resolve symlinks.</span></div> +<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#a9a06fe58fd74d8f9fdcea8c061c70cc5"> 30</a></span> <span class="keyword">inline</span> <a class="code" href="classResult.html">Result<std::string></a> <a class="code" href="namespaceinternal_1_1windows.html#a9a06fe58fd74d8f9fdcea8c061c70cc5">fullpath</a>(<span class="keyword">const</span> std::string& path)</div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="comment">// First query for the buffer size required.</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keyword">const</span> DWORD length =</div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  ::GetFullPathNameW(<a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">longpath</a>(path).data(), 0, <span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>);</div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordflow">if</span> (length == 0) {</div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(<span class="stringliteral">"Failed to retrieve fullpath buffer size"</span>);</div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div> +<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  std::vector<wchar_t> buffer;</div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  buffer.reserve(static_cast<size_t>(length));</div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keyword">const</span> DWORD result =</div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  ::GetFullPathNameW(<a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">longpath</a>(path).data(), length, buffer.data(), <span class="keyword">nullptr</span>);</div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">if</span> (result == 0) {</div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(<span class="stringliteral">"Failed to determine fullpath"</span>);</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">return</span> <a class="code" href="namespacestrings.html#a3fbaeb4d589c49ac115fab3412073ca7">strings::remove</a>(</div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(std::wstring(buffer.data())),</div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  os::LONGPATH_PREFIX,</div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths.html#abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6">strings::Mode::PREFIX</a>);</div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> }</div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Gets symlink data for a given path, if it exists.</span></div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment">//</span></div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment">// This turns out to be a very complicated task on Windows. The gist of it is</span></div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment">// that we know that symlinks on Windows are implemented with the Reparse Point</span></div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// API, and so the process is a matter of:</span></div> +<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">//</span></div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment">// 1. Checking whether the attributes for the file/folder specified by the</span></div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// path have the reparse point bit set; all symlinks are implemented with</span></div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// reparse points, so this bit should be on all symlinks.</span></div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">// 2. Opening a file/folder handle for that path, instructing it specifically</span></div> +<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// to open a handle for the symlink (if the path points at a symlink) and</span></div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// *not* the file the symlink points at (as is the default). Note that</span></div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment">// file and folder handles are different, so we have a function that</span></div> +<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// chooses appropriately.</span></div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// 3. Using `DeviceIoControl` to obtain information about the handle for this</span></div> +<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment">// reparse point, which we can then query to figure out if it's a reparse</span></div> +<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// point that is owned by the symlink filesystem filter driver.</span></div> +<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// 4. If it is, then we report that this path does point at a symlink.</span></div> +<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment">//</span></div> +<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment">// NOTE: it may be helpful to consult the documentation for each of these</span></div> +<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// functions, as they give you sources that justify the arguments to the</span></div> +<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">// obscure APIs we call to get this all working.</span></div> +<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="namespaceinternal_1_1windows.html#a39ca8fa0643b489f6bef951bef207c92"> 79</a></span> <span class="keyword">inline</span> <a class="code" href="classTry.html">Try<SymbolicLink></a> <a class="code" href="namespaceinternal_1_1windows.html#a39ca8fa0643b489f6bef951bef207c92">query_symbolic_link_data</a>(<span class="keyword">const</span> std::string& path)</div> +<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div> +<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">// Convert to absolute path because Windows APIs expect it.</span></div> +<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keyword">const</span> <a class="code" href="classResult.html">Result<std::string></a> absolute_path = <a class="code" href="namespaceinternal_1_1windows.html#a9a06fe58fd74d8f9fdcea8c061c70cc5">fullpath</a>(path);</div> +<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">if</span> (!absolute_path.<a class="code" href="classResult.html#a85eaa52037223d71092e65701c166562">isSome</a>()) {</div> +<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(absolute_path.<a class="code" href="classResult.html#a521adf96f5c27d26d6b1d580aae8aaee">error</a>());</div> +<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div> +<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div> +<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// Windows has no built-in way to tell whether a path points at a symbolic</span></div> +<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="comment">// link; but, we know that symbolic links are implemented with reparse</span></div> +<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// points, so we begin by checking that.</span></div> +<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="code" href="classTry.html">Try<bool></a> is_reparse_point = <a class="code" href="namespaceinternal_1_1windows.html#a9205fe9be7dc028375cd24338483152b">reparse_point_attribute_set</a>(</div> +<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  ::<a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">internal::windows::longpath</a>(absolute_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>()));</div> +<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div> +<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">if</span> (is_reparse_point.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div> +<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(is_reparse_point.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div> +<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!is_reparse_point.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>()) {</div> +<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(</div> +<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="stringliteral">"Reparse point attribute is not set for path '"</span> + absolute_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>() +</div> +<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="stringliteral">"', and therefore it is not a symbolic link"</span>);</div> +<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  }</div> +<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div> +<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keyword">const</span> <a class="code" href="classTry.html">Try<SharedHandle></a> symlink_handle =</div> +<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="namespaceinternal_1_1windows.html#a8ee4f75d803d8ed56ce760d8e1dfac14">get_handle_no_follow</a>(absolute_path.<a class="code" href="classResult.html#aedf79f3b14dcda5791b84a64ada4d412">get</a>());</div> +<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div> +<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">if</span> (symlink_handle.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div> +<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(symlink_handle.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div> +<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div> +<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div> +<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// Finally, retrieve symlink data for the handle, if any.</span></div> +<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceinternal_1_1windows.html#a85f7e5d0197eeb93bde525379b8e14d6">get_symbolic_link_data</a>(symlink_handle.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>().<a class="code" href="classSharedHandle.html#a800385e17e17cb826147968e748fd8fa">get_handle</a>());</div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> }</div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div> +<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> } <span class="comment">// namespace windows {</span></div> +<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> } <span class="comment">// namespace internal {</span></div> +<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div> +<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="preprocessor">#endif // __STOUT_INTERNAL_WINDOWS_SYMLINK_HPP__</span></div> +<div class="ttc" id="namespaceinternal_1_1windows_html_a9a06fe58fd74d8f9fdcea8c061c70cc5"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a9a06fe58fd74d8f9fdcea8c061c70cc5">internal::windows::fullpath</a></div><div class="ttdeci">Result< std::string > fullpath(const std::string &path)</div><div class="ttdef"><b>Definition:</b> symlink.hpp:30</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< SharedHandle > get_handle_no_follow(const std::string &absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:212</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="classSharedHandle_html_a800385e17e17cb826147968e748fd8fa"><div class="ttname"><a href="classSharedHandle.html#a800385e17e17cb826147968e748fd8fa">SharedHandle::get_handle</a></div><div class="ttdeci">HANDLE get_handle() const </div><div class="ttdef"><b>Definition:</b> windows.hpp:96</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="namespaceos_html_aa533c79d98af12b40b567a851e442373"><div class="ttname"><a href="namespaceos.html#aa533c79d98af12b40b567a851e442373">os::realpath</a></div><div class="ttdeci">Result< std::string > realpath(const std::string &path)</div><div class="ttdef"><b>Definition:</b> realpath.hpp:24</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< T > error(const std::string &message)</div><div class="ttdef"><b>Definition:</b> result.hpp:53</div></div> -<div class="ttc" id="namespaceinternal_1_1windows_html_a39ca8fa0643b489f6bef951bef207c92"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a39ca8fa0643b489f6bef951bef207c92">internal::windows::query_symbolic_link_data</a></div><div class="ttdeci">Try< SymbolicLink > query_symbolic_link_data(const std::string &path)</div><div class="ttdef"><b>Definition:</b> symlink.hpp:52</div></div> -<div class="ttc" id="namespaceinternal_1_1windows_html_a9205fe9be7dc028375cd24338483152b"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a9205fe9be7dc028375cd24338483152b">internal::windows::reparse_point_attribute_set</a></div><div class="ttdeci">Try< bool > reparse_point_attribute_set(const std::wstring &absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:136</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:106</div></div> +<div class="ttc" id="namespaceinternal_1_1windows_html_a39ca8fa0643b489f6bef951bef207c92"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a39ca8fa0643b489f6bef951bef207c92">internal::windows::query_symbolic_link_data</a></div><div class="ttdeci">Try< SymbolicLink > query_symbolic_link_data(const std::string &path)</div><div class="ttdef"><b>Definition:</b> symlink.hpp:79</div></div> +<div class="ttc" id="namespaceinternal_1_1windows_html_a9205fe9be7dc028375cd24338483152b"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a9205fe9be7dc028375cd24338483152b">internal::windows::reparse_point_attribute_set</a></div><div class="ttdeci">Try< bool > reparse_point_attribute_set(const std::wstring &absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:111</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="reparsepoint_8hpp_html"><div class="ttname"><a href="reparsepoint_8hpp.html">reparsepoint.hpp</a></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< SymbolicLink > get_symbolic_link_data(const HANDLE handle)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:236</div></div> +<div class="ttc" id="namespacestrings_html_a3fbaeb4d589c49ac115fab3412073ca7"><div class="ttname"><a href="namespacestrings.html#a3fbaeb4d589c49ac115fab3412073ca7">strings::remove</a></div><div class="ttdeci">std::string remove(const std::string &from, const std::string &substring, Mode mode=ANY)</div><div class="ttdef"><b>Definition:</b> strings.hpp:40</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< SymbolicLink > get_symbolic_link_data(const HANDLE handle)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:265</div></div> <div class="ttc" id="longpath_8hpp_html"><div class="ttname"><a href="longpath_8hpp.html">longpath.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 & 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 &e)</div><div class="ttdef"><b>Definition:</b> try.hpp:42</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="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths_html_abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6"><div class="ttname"><a href="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths.html#abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6">mesos::internal::slave::containerizer::paths::PREFIX</a></div><div class="ttdef"><b>Definition:</b> paths.hpp:82</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="namespaceinternal_1_1windows_html_abd7dbdbc8d95626d0c66455078380aa1"><div class="ttname"><a href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">internal::windows::longpath</a></div><div class="ttdeci">std::wstring longpath(const std::string &path)</div><div class="ttdef"><b>Definition:</b> longpath.hpp:38</div></div> +<div class="ttc" id="namespacens_html_a28116b46e6543597a11733424cd1aa20"><div class="ttname"><a href="namespacens.html#a28116b46e6543597a11733424cd1aa20">ns::stringify</a></div><div class="ttdeci">std::string stringify(int flags)</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 & get() const </div><div class="ttdef"><b>Definition:</b> try.hpp:73</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part -->
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/30b7fa50/content/api/latest/c++/windows_2exists_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/windows_2exists_8hpp_source.html b/content/api/latest/c++/windows_2exists_8hpp_source.html index c68b185..a587530 100644 --- a/content/api/latest/c++/windows_2exists_8hpp_source.html +++ b/content/api/latest/c++/windows_2exists_8hpp_source.html @@ -91,41 +91,39 @@ <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  ::<a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">internal::windows::longpath</a>(path).data());</div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordflow">if</span> (attributes == INVALID_FILE_ATTRIBUTES) {</div> -<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  DWORD <a class="code" href="namespacemesos_1_1internal_1_1slave_1_1cni_1_1spec.html#ae58e703656ab4a1bd5d9870441236727">error</a> = GetLastError();</div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keyword">const</span> DWORD <a class="code" href="namespacemesos_1_1internal_1_1slave_1_1cni_1_1spec.html#ae58e703656ab4a1bd5d9870441236727">error</a> = ::GetLastError();</div> <div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordflow">if</span> (error == ERROR_FILE_NOT_FOUND || error == ERROR_PATH_NOT_FOUND) {</div> <div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  }</div> <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div> -<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> -<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> }</div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">// Note that `ERROR_ACCESS_DENIED` etc. indicates the path does exist, but</span></div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="comment">// `INVALID_FILE_ATTRIBUTES` would still be returned.</span></div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div> -<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> -<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// Determine if the process identified by pid exists.</span></div> -<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// NOTE: Zombie processes have a pid and therefore exist. See</span></div> -<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// os::process(pid) to get details of a process.</span></div> -<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceos.html#a69b3969276ffa4cb698b9431ee43bd7c">exists</a>(<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid)</div> -<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> {</div> -<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a> handle = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);</div> -<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div> -<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordtype">bool</span> has_handle = <span class="keyword">false</span>;</div> -<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div> -<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordflow">if</span> (handle != <span class="keyword">nullptr</span>) {</div> -<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  has_handle = <span class="keyword">true</span>;</div> -<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  CloseHandle(handle);</div> -<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  }</div> -<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div> -<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">return</span> has_handle;</div> -<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> }</div> -<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> }</div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// Determine if the process identified by pid exists.</span></div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// NOTE: Zombie processes have a pid and therefore exist. See</span></div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// os::process(pid) to get details of a process.</span></div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceos.html#a69b3969276ffa4cb698b9431ee43bd7c">exists</a>(<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid)</div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="classSharedHandle.html">SharedHandle</a> handle(</div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  ::OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid),</div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  ::CloseHandle);</div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div> +<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">return</span> handle.get_handle() != <span class="keyword">nullptr</span>;</div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> }</div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> } <span class="comment">// namespace os {</span></div> <div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div> -<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> } <span class="comment">// namespace os {</span></div> -<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div> -<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor">#endif // __STOUT_OS_WINDOWS_EXISTS_HPP__</span></div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="preprocessor">#endif // __STOUT_OS_WINDOWS_EXISTS_HPP__</span></div> <div class="ttc" id="namespaceos_html_a69b3969276ffa4cb698b9431ee43bd7c"><div class="ttname"><a href="namespaceos.html#a69b3969276ffa4cb698b9431ee43bd7c">os::exists</a></div><div class="ttdeci">bool exists(const std::string &path)</div><div class="ttdef"><b>Definition:</b> exists.hpp:26</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:78</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="3rdparty_2stout_2include_2stout_2windows_8hpp_html_ab03ced250ed239bc3b50b669493997f9"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a></div><div class="ttdeci">DWORD pid_t</div><div class="ttdef"><b>Definition:</b> windows.hpp:187</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="longpath_8hpp_html"><div class="ttname"><a href="longpath_8hpp.html">longpath.hpp</a></div></div> <div class="ttc" id="error_8hpp_html"><div class="ttname"><a href="error_8hpp.html">error.hpp</a></div></div> <div class="ttc" id="namespacemesos_1_1internal_1_1slave_1_1cni_1_1spec_html_ae58e703656ab4a1bd5d9870441236727"><div class="ttname"><a href="namespacemesos_1_1internal_1_1slave_1_1cni_1_1spec.html#ae58e703656ab4a1bd5d9870441236727">mesos::internal::slave::cni::spec::error</a></div><div class="ttdeci">std::string error(const std::string &msg, uint32_t code)</div></div> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/30b7fa50/content/api/latest/c++/windows_2os_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/windows_2os_8hpp_source.html b/content/api/latest/c++/windows_2os_8hpp_source.html index a428615..de4f4ba 100644 --- a/content/api/latest/c++/windows_2os_8hpp_source.html +++ b/content/api/latest/c++/windows_2os_8hpp_source.html @@ -855,18 +855,22 @@ <div class="line"><a name="l00801"></a><span class="lineno"> 801</span> {</div> <div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  <span class="comment">// NOTE: On Windows, this code must run on the host where we are</span></div> <div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  <span class="comment">// expecting to `exec` the task, because the value of</span></div> -<div class="line"><a name="l00804"></a><span class="lineno"> 804</span>  <span class="comment">// `%SYSTEMROOT%` is not identical on all platforms.</span></div> -<div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a> system_root_env = <a class="code" href="namespaceos.html#add69634db977768c56f0367b4bb03cd5">os::getenv</a>(<span class="stringliteral">"SYSTEMROOT"</span>);</div> +<div class="line"><a name="l00804"></a><span class="lineno"> 804</span>  <span class="comment">// `%SystemRoot%` is not identical on all platforms.</span></div> +<div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a> system_root_env = <a class="code" href="namespaceos.html#add69634db977768c56f0367b4bb03cd5">os::getenv</a>(<span class="stringliteral">"SystemRoot"</span>);</div> <div class="line"><a name="l00806"></a><span class="lineno"> 806</span>  <span class="keyword">const</span> std::string system_root = system_root_env.<a class="code" href="classOption.html#a4e3bf8416d95246f43c91f1b5c309323">isSome</a>()</div> <div class="line"><a name="l00807"></a><span class="lineno"> 807</span>  ? system_root_env.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>()</div> -<div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  : <span class="stringliteral">"C:\\WINDOWS"</span>;</div> +<div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  : <a class="code" href="namespacepath.html#aa86b16a2171cec90bb3337930513ef0f">path::join</a>(<span class="stringliteral">"C:"</span>, <span class="stringliteral">"Windows"</span>);</div> <div class="line"><a name="l00809"></a><span class="lineno"> 809</span> </div> -<div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  <span class="keywordflow">return</span> <a class="code" href="namespacestrings.html#ac315a6174f56cba0d8295f84da265416">strings::join</a>(<span class="stringliteral">";"</span>, system_root, <a class="code" href="namespacepath.html#aa86b16a2171cec90bb3337930513ef0f">path::join</a>(system_root, <span class="stringliteral">"system32"</span>));</div> -<div class="line"><a name="l00811"></a><span class="lineno"> 811</span> }</div> -<div class="line"><a name="l00812"></a><span class="lineno"> 812</span> </div> -<div class="line"><a name="l00813"></a><span class="lineno"> 813</span> } <span class="comment">// namespace os {</span></div> -<div class="line"><a name="l00814"></a><span class="lineno"> 814</span> </div> -<div class="line"><a name="l00815"></a><span class="lineno"> 815</span> <span class="preprocessor">#endif // __STOUT_WINDOWS_OS_HPP__</span></div> +<div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  <span class="keywordflow">return</span> <a class="code" href="namespacestrings.html#ac315a6174f56cba0d8295f84da265416">strings::join</a>(<span class="stringliteral">";"</span>,</div> +<div class="line"><a name="l00811"></a><span class="lineno"> 811</span>  <a class="code" href="namespacepath.html#aa86b16a2171cec90bb3337930513ef0f">path::join</a>(system_root, <span class="stringliteral">"System32"</span>),</div> +<div class="line"><a name="l00812"></a><span class="lineno"> 812</span>  system_root,</div> +<div class="line"><a name="l00813"></a><span class="lineno"> 813</span>  <a class="code" href="namespacepath.html#aa86b16a2171cec90bb3337930513ef0f">path::join</a>(system_root, <span class="stringliteral">"System32"</span>, <span class="stringliteral">"Wbem"</span>),</div> +<div class="line"><a name="l00814"></a><span class="lineno"> 814</span>  <a class="code" href="namespacepath.html#aa86b16a2171cec90bb3337930513ef0f">path::join</a>(system_root, <span class="stringliteral">"System32"</span>, <span class="stringliteral">"WindowsPowerShell"</span>, <span class="stringliteral">"v1.0"</span>));</div> +<div class="line"><a name="l00815"></a><span class="lineno"> 815</span> }</div> +<div class="line"><a name="l00816"></a><span class="lineno"> 816</span> </div> +<div class="line"><a name="l00817"></a><span class="lineno"> 817</span> } <span class="comment">// namespace os {</span></div> +<div class="line"><a name="l00818"></a><span class="lineno"> 818</span> </div> +<div class="line"><a name="l00819"></a><span class="lineno"> 819</span> <span class="preprocessor">#endif // __STOUT_WINDOWS_OS_HPP__</span></div> <div class="ttc" id="classResult_html_ac2cdc0db9f9d29a5bb2f1cf19c29da49"><div class="ttname"><a href="classResult.html#ac2cdc0db9f9d29a5bb2f1cf19c29da49">Result::isNone</a></div><div class="ttdeci">bool isNone() const </div><div class="ttdef"><b>Definition:</b> result.hpp:109</div></div> <div class="ttc" id="namespaceos_1_1stat_html_a96066cfc01f1f62fc25b56f6915800eb"><div class="ttname"><a href="namespaceos_1_1stat.html#a96066cfc01f1f62fc25b56f6915800eb">os::stat::uid</a></div><div class="ttdeci">Try< uid_t > uid(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)</div><div class="ttdef"><b>Definition:</b> stat.hpp:182</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> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/30b7fa50/content/api/latest/c++/windows_2realpath_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/windows_2realpath_8hpp.html b/content/api/latest/c++/windows_2realpath_8hpp.html index 311132f..68d6124 100644 --- a/content/api/latest/c++/windows_2realpath_8hpp.html +++ b/content/api/latest/c++/windows_2realpath_8hpp.html @@ -59,7 +59,9 @@ <code>#include <<a class="el" href="result_8hpp_source.html">stout/result.hpp</a>></code><br/> <code>#include <<a class="el" href="stringify_8hpp_source.html">stout/stringify.hpp</a>></code><br/> <code>#include <<a class="el" href="strings_8hpp_source.html">stout/strings.hpp</a>></code><br/> +<code>#include <<a class="el" href="3rdparty_2stout_2include_2stout_2windows_8hpp_source.html">stout/windows.hpp</a>></code><br/> <code>#include <<a class="el" href="longpath_8hpp_source.html">stout/internal/windows/longpath.hpp</a>></code><br/> +<code>#include <<a class="el" href="reparsepoint_8hpp_source.html">stout/internal/windows/reparsepoint.hpp</a>></code><br/> </div> <p><a href="windows_2realpath_8hpp_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/30b7fa50/content/api/latest/c++/windows_2realpath_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/windows_2realpath_8hpp_source.html b/content/api/latest/c++/windows_2realpath_8hpp_source.html index e72883a..94cb128 100644 --- a/content/api/latest/c++/windows_2realpath_8hpp_source.html +++ b/content/api/latest/c++/windows_2realpath_8hpp_source.html @@ -72,55 +72,70 @@ <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <<a class="code" href="result_8hpp.html">stout/result.hpp</a>></span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <<a class="code" href="stringify_8hpp.html">stout/stringify.hpp</a>></span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <<a class="code" href="strings_8hpp.html">stout/strings.hpp</a>></span></div> -<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> -<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <<a class="code" href="longpath_8hpp.html">stout/internal/windows/longpath.hpp</a>></span></div> -<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div> -<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div> -<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">namespace </span>os {</div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>></span></div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="longpath_8hpp.html">stout/internal/windows/longpath.hpp</a>></span></div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="reparsepoint_8hpp.html">stout/internal/windows/reparsepoint.hpp</a>></span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div> -<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">inline</span> <a class="code" href="classResult.html">Result<std::string></a> <a class="code" href="namespaceos.html#aa533c79d98af12b40b567a851e442373">realpath</a>(<span class="keyword">const</span> std::string& path)</div> -<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> {</div> -<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="comment">// TODO(andschwa): Test the existence of `path` to be consistent with POSIX</span></div> -<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="comment">// `::realpath`.</span></div> -<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> -<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  std::wstring <a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">longpath</a> = <a class="code" href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">::internal::windows::longpath</a>(path);</div> -<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div> -<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="comment">// First query for the buffer size required.</span></div> -<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  DWORD length = GetFullPathNameW(longpath.data(), 0, <span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>);</div> -<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordflow">if</span> (length == 0) {</div> -<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(<span class="stringliteral">"Failed to retrieve realpath buffer size"</span>);</div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span>os {</div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment">// This should behave like the POSIX `realpath` API: specifically it should</span></div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// resolve symlinks in the path, and succeed only if the target file exists.</span></div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// This requires that the user has permissions to resolve each component of the</span></div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// path.</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">inline</span> <a class="code" href="classResult.html">Result<std::string></a> <a class="code" href="namespaceos.html#aa533c79d98af12b40b567a851e442373">realpath</a>(<span class="keyword">const</span> std::string& path)</div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keyword">const</span> <a class="code" href="classTry.html">Try<SharedHandle></a> handle = <a class="code" href="namespaceinternal_1_1windows.html#a5b261c85683d489b859236063e979e98">::internal::windows::get_handle_follow</a>(path);</div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordflow">if</span> (handle.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(handle.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div> -<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  std::vector<wchar_t> buffer;</div> -<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  buffer.reserve(static_cast<size_t>(length));</div> -<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> -<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  DWORD result =</div> -<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  GetFullPathNameW(longpath.data(), length, buffer.data(), <span class="keyword">nullptr</span>);</div> -<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div> -<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">if</span> (result == 0) {</div> -<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(<span class="stringliteral">"Failed to determine realpath"</span>);</div> -<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="comment">// First query for the buffer size required.</span></div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  DWORD length = ::GetFinalPathNameByHandleW(</div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  handle.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>().<a class="code" href="classSharedHandle.html#a800385e17e17cb826147968e748fd8fa">get_handle</a>(), <span class="keyword">nullptr</span>, 0, FILE_NAME_NORMALIZED);</div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">if</span> (length == 0) {</div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(<span class="stringliteral">"Failed to retrieve realpath buffer size"</span>);</div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  }</div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  std::vector<wchar_t> buffer;</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  buffer.reserve(static_cast<size_t>(length));</div> <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> -<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">return</span> <a class="code" href="namespacestrings.html#a3fbaeb4d589c49ac115fab3412073ca7">strings::remove</a>(</div> -<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(std::wstring(buffer.data())),</div> -<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  os::LONGPATH_PREFIX,</div> -<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths.html#abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6">strings::Mode::PREFIX</a>);</div> -<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> }</div> -<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div> -<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> } <span class="comment">// namespace os {</span></div> -<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div> -<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#endif // __STOUT_OS_WINDOWS_REALPATH_HPP__</span></div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  DWORD result = ::GetFinalPathNameByHandleW(</div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  handle.<a class="code" href="classTry.html#a7be0768038e0628632492edf6cc1515a">get</a>().<a class="code" href="classSharedHandle.html#a800385e17e17cb826147968e748fd8fa">get_handle</a>(), buffer.data(), length, FILE_NAME_NORMALIZED);</div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">if</span> (result == 0) {</div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordflow">return</span> <a class="code" href="classWindowsError.html">WindowsError</a>(<span class="stringliteral">"Failed to determine realpath"</span>);</div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  }</div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> <a class="code" href="namespacestrings.html#a3fbaeb4d589c49ac115fab3412073ca7">strings::remove</a>(</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="namespacens.html#a28116b46e6543597a11733424cd1aa20">stringify</a>(std::wstring(buffer.data())),</div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  os::LONGPATH_PREFIX,</div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths.html#abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6">strings::Mode::PREFIX</a>);</div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> }</div> +<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> } <span class="comment">// namespace os {</span></div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor">#endif // __STOUT_OS_WINDOWS_REALPATH_HPP__</span></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="classSharedHandle_html_a800385e17e17cb826147968e748fd8fa"><div class="ttname"><a href="classSharedHandle.html#a800385e17e17cb826147968e748fd8fa">SharedHandle::get_handle</a></div><div class="ttdeci">HANDLE get_handle() const </div><div class="ttdef"><b>Definition:</b> windows.hpp:96</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="namespaceos_html_aa533c79d98af12b40b567a851e442373"><div class="ttname"><a href="namespaceos.html#aa533c79d98af12b40b567a851e442373">os::realpath</a></div><div class="ttdeci">Result< std::string > realpath(const std::string &path)</div><div class="ttdef"><b>Definition:</b> realpath.hpp:24</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:106</div></div> <div class="ttc" id="result_8hpp_html"><div class="ttname"><a href="result_8hpp.html">result.hpp</a></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="reparsepoint_8hpp_html"><div class="ttname"><a href="reparsepoint_8hpp.html">reparsepoint.hpp</a></div></div> <div class="ttc" id="namespacestrings_html_a3fbaeb4d589c49ac115fab3412073ca7"><div class="ttname"><a href="namespacestrings.html#a3fbaeb4d589c49ac115fab3412073ca7">strings::remove</a></div><div class="ttdeci">std::string remove(const std::string &from, const std::string &substring, Mode mode=ANY)</div><div class="ttdef"><b>Definition:</b> strings.hpp:40</div></div> <div class="ttc" id="longpath_8hpp_html"><div class="ttname"><a href="longpath_8hpp.html">longpath.hpp</a></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 &e)</div><div class="ttdef"><b>Definition:</b> try.hpp:42</div></div> +<div class="ttc" id="namespaceinternal_1_1windows_html_a5b261c85683d489b859236063e979e98"><div class="ttname"><a href="namespaceinternal_1_1windows.html#a5b261c85683d489b859236063e979e98">internal::windows::get_handle_follow</a></div><div class="ttdeci">Try< SharedHandle > get_handle_follow(const std::string &absolute_path)</div><div class="ttdef"><b>Definition:</b> reparsepoint.hpp:155</div></div> <div class="ttc" id="error_8hpp_html"><div class="ttname"><a href="error_8hpp.html">error.hpp</a></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="stringify_8hpp_html"><div class="ttname"><a href="stringify_8hpp.html">stringify.hpp</a></div></div> <div class="ttc" id="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths_html_abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6"><div class="ttname"><a href="namespacemesos_1_1internal_1_1slave_1_1containerizer_1_1paths.html#abb8ab3e62de157d1a7a81e08888ec30cabf80c29a65453b2615d8f9bd83f8f3d6">mesos::internal::slave::containerizer::paths::PREFIX</a></div><div class="ttdef"><b>Definition:</b> paths.hpp:82</div></div> -<div class="ttc" id="namespaceinternal_1_1windows_html_abd7dbdbc8d95626d0c66455078380aa1"><div class="ttname"><a href="namespaceinternal_1_1windows.html#abd7dbdbc8d95626d0c66455078380aa1">internal::windows::longpath</a></div><div class="ttdeci">std::wstring longpath(const std::string &path)</div><div class="ttdef"><b>Definition:</b> longpath.hpp:38</div></div> <div class="ttc" id="namespacens_html_a28116b46e6543597a11733424cd1aa20"><div class="ttname"><a href="namespacens.html#a28116b46e6543597a11733424cd1aa20">ns::stringify</a></div><div class="ttdeci">std::string stringify(int flags)</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 & get() const </div><div class="ttdef"><b>Definition:</b> try.hpp:73</div></div> <div class="ttc" id="strings_8hpp_html"><div class="ttname"><a href="strings_8hpp.html">strings.hpp</a></div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/30b7fa50/content/api/latest/c++/windows_2rm_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/windows_2rm_8hpp.html b/content/api/latest/c++/windows_2rm_8hpp.html index 7d473d5..c9e7d73 100644 --- a/content/api/latest/c++/windows_2rm_8hpp.html +++ b/content/api/latest/c++/windows_2rm_8hpp.html @@ -62,17 +62,24 @@ <code>#include <<a class="el" href="try_8hpp_source.html">stout/try.hpp</a>></code><br/> <code>#include <<a class="el" href="3rdparty_2stout_2include_2stout_2windows_8hpp_source.html">stout/windows.hpp</a>></code><br/> <code>#include <<a class="el" href="stat_8hpp_source.html">stout/os/stat.hpp</a>></code><br/> +<code>#include <<a class="el" href="windows_2os_8hpp_source.html">stout/windows/os.hpp</a>></code><br/> <code>#include <<a class="el" href="longpath_8hpp_source.html">stout/internal/windows/longpath.hpp</a>></code><br/> </div> <p><a href="windows_2rm_8hpp_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> Namespaces</h2></td></tr> +<tr class="memitem:namespaceinternal"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceinternal.html">internal</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespaceinternal_1_1windows"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceinternal_1_1windows.html">internal::windows</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:namespaceos"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceos.html">os</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </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:ac9fbbbc8bb9b553f3ad1abac7c9a81c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classTry.html">Try</a>< <a class="el" href="structNothing.html">Nothing</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceinternal_1_1windows.html#ac9fbbbc8bb9b553f3ad1abac7c9a81c3">internal::windows::wait_on_delete</a> (const std::string &path)</td></tr> +<tr class="separator:ac9fbbbc8bb9b553f3ad1abac7c9a81c3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac1c8ce3595084d78291f98c2be9f62ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classTry.html">Try</a>< <a class="el" href="structNothing.html">Nothing</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceos.html#ac1c8ce3595084d78291f98c2be9f62ba">os::rm</a> (const std::string &path)</td></tr> <tr class="separator:ac1c8ce3595084d78291f98c2be9f62ba"><td class="memSeparator" colspan="2"> </td></tr> </table>
