Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59442 - sandbox/filesystem-v3/libs/filesystem/doc
From: bdawes_at_[hidden]
Date: 2010-02-03 08:03:08


Author: bemandawes
Date: 2010-02-03 08:03:07 EST (Wed, 03 Feb 2010)
New Revision: 59442
URL: http://svn.boost.org/trac/boost/changeset/59442

Log:
Reorg work in progress
Text files modified:
   sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html | 115 +++++++++++++++++++++------------------
   1 files changed, 61 insertions(+), 54 deletions(-)

Modified: sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html (original)
+++ sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html 2010-02-03 08:03:07 EST (Wed, 03 Feb 2010)
@@ -449,13 +449,11 @@
       results ourselves. </li>
     </ul>
 
+<p>Move on to the next section to see how those changes play out!</p>
+
 <h2>tut4.cpp - Using a path decomposition
 function, plus sorting results</h2>
 
- <p>blah, blah</p>
-
-<p>&nbsp;</p>
-
 <table align="center" border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="90%">
   <tr>
     <td style="font-size: 10pt">
@@ -526,8 +524,8 @@
     from a path (<code>&quot;/bar/foo.txt&quot;</code>). These decomposition functions are
     explored in the <a href="#path-iteration-etc">Path iterators, observers,
     composition, decomposition and query</a> portion of this tutorial.</p>
- <p>We wrote the above as two lines of code for clarity. It could have been
- written more concisely as:</p>
+ <p>The above was written as two lines of code for clarity. It could have
+ been written more concisely as:</p>
     <blockquote>
       <pre>v.push_back(it-&gt;path().filename()); // we only care about the filename</pre>
     </blockquote>
@@ -592,12 +590,63 @@
     </tr>
   </table>
 
+ <p>That completes the main section of this tutorial. If you haven't already
+ worked through the Class path and
+ <a href="#path-iteration-etc">Path iterators, observers, composition,
+ decomposition and query</a> sections of this tutorial, dig into them now.
+ The Error reporting section may also be of
+ interest, although it can be skipped unless you are deeply concerned with
+ error handling issues.</p>
+
+<hr>
+
+<h2><a name="Class-path">Class path</a></h2>
+
+<p>Rather than trafficking in <code>const char*</code>'s, Boost.Filesystem
+operational functions traffics in objects of class path,
+which are a lot more flexible. For example, class path has a converting constructor
+template:</p>
+
+<blockquote style="font-size: 10pt">
+ <pre>template &lt;class Source&gt;
+ path(Source const&amp; source);</pre>
+</blockquote>
+<p>and this allows <code>const path&amp;</code> arguments to be called with a
+variety of object types, such as:</p>
+<ul>
+ <li style="font-size: 10pt">An iterator, such as a pointer, for a null terminated byte-string.
+ Value type can be <code>char</code>, <code>
+ wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
+ <li style="font-size: 10pt">A container with a value type of <code>char</code>, <code>
+ wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
+ <li style="font-size: 10pt">A C-array with a value type of <code>char</code>, <code>
+ wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
+ <li style="font-size: 10pt">A <code>boost::filesystem::directory_entry</code>.</li>
+</ul>
+<p>In addition to handling a variety of types, class path function templates
+also handle conversion between the argument's encoding and the internal encoding
+required for communication with the operating system. Thus it's no problem to
+pass a wide character string to a Boost.Filesystem operational function even if
+the underlying operating system uses narrow characters, and visa versa. </p>
+<p>Say we have a file named <code><font size="4">valentine</font></code> we'd
+like to rename <code><font size="4">&#9829;valentine</font></code>. Here's the code:</p>
+<blockquote style="font-size: 10pt">
+ <pre>boost::filesystem::rename(&quot;valentine&quot;, L&quot;\u2665valentine&quot;);</pre>
+</blockquote>
+
+ <p>Class <code>path</code> will take care of whatever character type or
+ encoding conversions are required by the particular operating system. It also
+ provides path syntax that is portable across operating systems, element
+ iterators, and observer, composition, decomposition, and query functions to
+ manipulate the elements of a path. <span style="background-color: #FFFF00">
+ More on class </span><code><span style="background-color: #FFFF00">path</span></code><span style="background-color: #FFFF00">
+ later in this tutorial.</span></p>
+
     <hr>
 
-<h2>path_info.cpp
-<a name="path-iteration-etc"></a>- Path iterators, observers, composition, decomposition and query</h2>
+<h2><a name="path-iteration-etc"></a>Path iterators, observers, composition, decomposition, and query</h2>
 
-<p>The <code>path_info</code> program is handy for learning how class <code>path</code>
+<p>The path_info.cpp program is handy for learning how class <code>path</code>
 iterators,
 observers, composition, decomposition, and query functions work on your system.
 If it hasn't already already been built on your system, please build it now. Run
@@ -852,53 +901,11 @@
     </tr>
   </table>
 
-<hr>
-
-<h3><a name="Class-path">Class path</a></h3>
-
-<p>Rather than trafficking in <code>const char*</code>'s, Boost.Filesystem
-operational functions traffics in objects of class path,
-which are a lot more flexible. For example, class path has a converting constructor
-template:</p>
-
-<blockquote style="font-size: 10pt">
- <pre>template &lt;class Source&gt;
- path(Source const&amp; source);</pre>
-</blockquote>
-<p>and this allows <code>const path&amp;</code> arguments to be called with a
-variety of object types, such as:</p>
-<ul>
- <li style="font-size: 10pt">An iterator, such as a pointer, for a null terminated byte-string.
- Value type can be <code>char</code>, <code>
- wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
- <li style="font-size: 10pt">A container with a value type of <code>char</code>, <code>
- wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
- <li style="font-size: 10pt">A C-array with a value type of <code>char</code>, <code>
- wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
- <li style="font-size: 10pt">A <code>boost::filesystem::directory_entry</code>.</li>
-</ul>
-<p>In addition to handling a variety of types, class path function templates
-also handle conversion between the argument's encoding and the internal encoding
-required for communication with the operating system. Thus it's no problem to
-pass a wide character string to a Boost.Filesystem operational function even if
-the underlying operating system uses narrow characters, and visa versa. </p>
-<p>Say we have a file named <code><font size="4">valentine</font></code> we'd
-like to rename <code><font size="4">&#9829;valentine</font></code>. Here's the code:</p>
-<blockquote style="font-size: 10pt">
- <pre>boost::filesystem::rename(&quot;valentine&quot;, L&quot;\u2665valentine&quot;);</pre>
-</blockquote>
-
- <p>Class <code>path</code> will take care of whatever character type or
- encoding conversions are required by the particular operating system. It also
- provides path syntax that is portable across operating systems, element
- iterators, and observer, composition, decomposition, and query functions to
- manipulate the elements of a path. <span style="background-color: #FFFF00">
- More on class </span><code><span style="background-color: #FFFF00">path</span></code><span style="background-color: #FFFF00">
- later in this tutorial.</span></p>
+ <p>&nbsp;</p>
 
   <hr>
 
- <h3>Error reporting</h3>
+ <h2><a name="Error-reporting">Error reporting</a></h2>
 
   <p>Legacy C interfaces like the original <code>rename</code> function report
   errors via an error code, typically obtained via <code>errno</code>. The
@@ -930,7 +937,7 @@
 <p>&nbsp;</p>
 
 <hr>
-<p>© Copyright Beman Dawes 2009</p>
+<p>© Copyright Beman Dawes 2010</p>
 <p>Distributed under the Boost Software License, Version 1.0. See
 <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
 <p>Revised


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk