Ticket #964: i18n.html.patch

File i18n.html.patch, 8.5 KB (added by bdawes@…, 15 years ago)

patch for libs/filesystem/doc/i18n.html

  • .html

    old new  
    3434&nbsp;</li>
    3535  <li><a href="#Preservation">Preservation</a> of existing user code whenever
    3636  possible.<br>
    3737&nbsp;</li>
    3838  <li><a href="#More_efficient">More efficient operations</a> when iterating over directories.<br>
    3939&nbsp;</li>
    40   <li>A <a href="convenience.htm#basic_recursive_directory_iterator">recursive
     40  <li>A
     41  <a href="tr2_proposal.html#Class-template-basic_recursive_directory_iterator">recursive
    4142  directory iterator</a> is now provided. </li>
    4243</ul>
    4344<p><a href="#Rationale">Rationale</a> for some of the changes is also provided.</p>
    4445<h2><a name="Internationalization">Internationalization</a></h2>
    4546<p>Cass templates <i>basic_path</i>, <i>basic_filesystem_error</i>, and <i>
    4647basic_directory_iterator</i> provide the basic mechanisms for
     
    6465types is performed by path traits classes. The specific conversions for <i>path</i>
    6566and <i>wpath</i> is implementation defined, with normative encouragement to use
    6667the operating system's preferred file system encoding. For many modern POSIX-based
    6768file systems the <i>wpath</i> external encoding is <a href="design.htm#Kuhn">
    6869UTF-8</a>, while for modern Windows file systems such as NTFS it is
    6970<a href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a>.</p>
    70 <p>The <a href="operations.htm">operational functions</a> in
     71<p>The <a href="tr2_proposal.html#Operations-functions">operational functions</a> in
    7172<a href="../../../boost/filesystem/operations.hpp">operations.hpp</a> are provided with overloads for
    7273<i>path</i>, <i>wpath</i>, and user-defined <i>basic_path</i>'s. A
    73 <a href="operations.htm#Do-the-right-thing">&quot;do-the-right-thing&quot; rule</a>
     74<a href="tr2_proposal.html#Requirements-on-implementations">&quot;do-the-right-thing&quot; rule</a>
    7475applies to implementations, ensuring that the correct overload will be chosen.</p>
    7576<h2><a name="Simplification">Simplification</a> of path interface</h2>
    7677<p>Prior versions of the library required users of class <i>path</i> to identify
    7778the format (native or generic) and name error-checking policy, either via a
    7879second constructor argument or via a default mechanism. That approach caused
    7980complaints, particularly from users not needing the name checking features. The
     
    8586  These constructors are only provided to ease the transition of existing code.<br>
    8687&nbsp;</li>
    8788  <li>Path name checking functionality has been moved out of class path and into
    8889  separate free-functions. This still provides name checking for those who need
    8990  it, but with much less impact on those who don't need it.</li>
    9091</ul>
    91 <p>Additionally, <a href="exception.htm">basic_filesystem_error</a> has been put
     92<p>Additionally,
     93<a href="tr2_proposal.html#Class-template-basic_filesystem_error">basic_filesystem_error</a> has been put
    9294on a diet and generally simplified.</p>
    9395<p>Error codes have been simplified and aligned with [POSIX-01]. A supporting
    9496header <a href="../../../boost/filesystem/cerrno.hpp">
    9597&lt;boost/filesystem/cerrno.hpp&gt;</a> is also provided.</p>
    9698<p><code>&quot;//:&quot;</code> has been introduced as a path escape prefix to identify
    9799native paths. Rationale: simplifies basic_path constructor interfaces, easier
     
    107109what the expectations were for true and false values of the various predicates.
    108110See the <a href="#table">table</a> below.</p>
    109111<h3>status()</h3>
    110112<p>As part of the predicate discussions, particularly with Rob Stewart, it
    111113became obvious that sometimes applications need access to raw status information
    112114without any possibility of an exception being thrown. The
    113 <a href="operations.htm#status">status()</a> function was added to meet this
     115<a href="tr2_proposal.html#Status-functions">status()</a> function was added to meet this
    114116need. It also proved clearer to specify the semantics of predicate functions in
    115117terms of status().</p>
    116118<h3><a name="is_file">is_file</a>()</h3>
    117119<p>About the same time, Jeff Garland suggested that an
    118 <a href="operations.htm#is_file">is_file()</a> predicate would
    119 compliment 
    120 <a href="operations.htm#is_directory">is_directory()</a>. In working on the analysis below, it became obvious
     120<a href="tr2_proposal.html#Predicate-functions">is_file()</a> predicate would
     121compliment <a href="tr2_proposal.html#Predicate-functions">is_directory()</a>. In working on the analysis below, it became obvious
    121122that the expectations for is_file() were different from the expectations for !is_directory(),
    122123so is_file() was added. </p>
    123124<h3><a name="is_other">is_other</a>()</h3>
    124125<p>On some operating systems, it is possible to have a directory entry which is
    125 not for either a directory or a file. The <a href="operations.htm">is_other()</a>
     126not for either a directory or a file. The
     127<a href="tr2_proposal.html#Predicate-functions">is_other()</a>
    126128function identifies such cases.</p>
    127129<h3>Should predicates throw on errors?</h3>
    128130<p>Some conditions reported by operating systems as errors (see
    129131<a href="#Footnote">footnote</a>) clearly simply indicate that the predicate is
    130132false, rather than indicating serious failure. But other errors represent
    131133serious hardware or network problems, or permissions problems.</p>
    132134<p>Some people, particularly Rob Stewart, argue that in a function like
    133 <a href="operations.htm#is_directory">is_directory()</a>, any error should simply cause the function to return false. If
     135<a href="tr2_proposal.html#Predicate-functions">is_directory()</a>, any error should simply cause the function to return false. If
    134136there is actually an underlying problem, it will be detected it due course when
    135137a directory_iterator or fstream operation is attempted.</p>
    136138<p>That view is was rejected because of the following considerations:</p>
    137139<ul>
    138140  <li>As a general principle, the earlier errors can be reported, the better.
    139141  The rationale being that it is often much cheaper to fix errors sooner rather
     
    385387  conversions could cause incorrect results, that conversions best left to the
    386388  operating system would be performed, and that the technical complexity was too
    387389  great in relation to perceived benefits. User-defined types would only make
    388390  the problem worse.<br>
    389391&nbsp;</li>
    390392</ul>
    391 <h3>No versions of <a href="operations.htm#status">status()</a> which throw exceptions on
     393<h3>No versions of <a href="tr2_proposal.html#Status-functions">status()</a> which throw exceptions on
    392394errors</h3>
    393395<p>The rationale for not including versions of status()
    394396which throw exceptions on errors is that (1) the primary purpose of this
    395397function is to perform queries at a very low-level, where exceptions are usually
    396398unwanted, and (2) exceptions on errors are already provided by the predicate
    397399functions. There would be little or no efficiency gain from providing a throwing
    398400version of status().</p>
    399 <h3>Symlink identifying version of <a href="operations.htm#status">status()</a> function</h3>
     401<h3>Symlink identifying version of <a href="tr2_proposal.html#Status-functions">status()</a> function</h3>
    400402<p>A symlink identifying version of the status() function is distinguished by a
    401403second argument. Often separately named functions are more appropriate than
    402404overloading when behavior
    403405differs, which is the case here, while overloads are more appropriate when
    404406behavior is the same but argument types differ (Iain Hanson). Overloading was
    405407chosen in this particular case because a subjective judgment that a single
     
    412414characters, the default conversion should not depend on the operating system
    413415alone, but on the std::locale(&quot;&quot;) default. For example, the usual encoding
    414416for Russian on Linux (and Russian web sites) is KOI8-R (RFC1489). The ability to safely specify a different locale
    415417is also provided, to meet unforeseen needs.</p>
    416418<hr>
    417419<p>Revised
    418 <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->16 December, 2005<!--webbot bot="Timestamp" endspan i-checksum="38518" --></p>
     420<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->03 June, 2007<!--webbot bot="Timestamp" endspan i-checksum="19946" --></p>
    419421<p>© Copyright Beman Dawes, 2005</p>
    420422<p>Distributed under the Boost Software License, Version 1.0.
    421423(See accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
    422424copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
    423425
    424426</body>
    425427
    426428</html>