|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69521 - in branches/release: boost boost/filesystem boost/filesystem/v3 libs/filesystem libs/filesystem/v3/doc libs/filesystem/v3/src libs/filesystem/v3/test
From: bdawes_at_[hidden]
Date: 2011-03-03 13:00:27
Author: bemandawes
Date: 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
New Revision: 69521
URL: http://svn.boost.org/trac/boost/changeset/69521
Log:
Merge trunk; 3 code fixes, 1 doc fix
Added:
branches/release/libs/filesystem/v3/doc/release_history.html
- copied unchanged from r69520, /trunk/libs/filesystem/v3/doc/release_history.html
Properties modified:
branches/release/boost/filesystem/ (props changed)
branches/release/boost/filesystem.hpp (props changed)
branches/release/libs/filesystem/ (props changed)
Text files modified:
branches/release/boost/filesystem/v3/fstream.hpp | 3
branches/release/boost/filesystem/v3/path.hpp | 1
branches/release/libs/filesystem/v3/doc/deprecated.html | 6
branches/release/libs/filesystem/v3/doc/faq.htm | 6
branches/release/libs/filesystem/v3/doc/index.htm | 6
branches/release/libs/filesystem/v3/doc/portability_guide.htm | 6
branches/release/libs/filesystem/v3/doc/reference.html | 532 +++++++++++++++++++++------------------
branches/release/libs/filesystem/v3/doc/tutorial.html | 6
branches/release/libs/filesystem/v3/doc/v3.html | 6
branches/release/libs/filesystem/v3/doc/v3_design.html | 6
branches/release/libs/filesystem/v3/src/operations.cpp | 8
branches/release/libs/filesystem/v3/src/path.cpp | 22 -
branches/release/libs/filesystem/v3/test/fstream_test.cpp | 3
13 files changed, 328 insertions(+), 283 deletions(-)
Modified: branches/release/boost/filesystem/v3/fstream.hpp
==============================================================================
--- branches/release/boost/filesystem/v3/fstream.hpp (original)
+++ branches/release/boost/filesystem/v3/fstream.hpp 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -27,7 +27,8 @@
// on Windows, except for standard libaries known to have wchar_t overloads for
// file stream I/O, use path::string() to get a narrow character c_str()
#if defined(BOOST_WINDOWS_API) \
- && !(defined(_CPPLIB_VER) && _CPPLIB_VER >= 405) // not (Dinkumware with overloads)
+ && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION))
+ // !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware
# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available
#else // use the native c_str, which will be narrow on POSIX, wide on Windows
# define BOOST_FILESYSTEM_C_STR c_str()
Modified: branches/release/boost/filesystem/v3/path.hpp
==============================================================================
--- branches/release/boost/filesystem/v3/path.hpp (original)
+++ branches/release/boost/filesystem/v3/path.hpp 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -452,7 +452,6 @@
void m_erase_redundant_separator(string_type::size_type sep_pos);
string_type::size_type m_parent_path_end() const;
- void m_portable();
path& m_normalize();
Modified: branches/release/libs/filesystem/v3/doc/deprecated.html
==============================================================================
--- branches/release/libs/filesystem/v3/doc/deprecated.html (original)
+++ branches/release/libs/filesystem/v3/doc/deprecated.html 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -24,8 +24,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -373,7 +373,7 @@
<hr>
<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->02 July, 2010<!--webbot bot="Timestamp" endspan i-checksum="21056" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->20 February, 2011<!--webbot bot="Timestamp" endspan i-checksum="40524" --></p>
<p>© Copyright Beman Dawes, 2002-2005, 2010</p>
<p> Use, modification, and distribution are subject to the Boost Software
Modified: branches/release/libs/filesystem/v3/doc/faq.htm
==============================================================================
--- branches/release/libs/filesystem/v3/doc/faq.htm (original)
+++ branches/release/libs/filesystem/v3/doc/faq.htm 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -24,8 +24,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -140,7 +140,7 @@
free functions.</p>
<hr>
<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 February, 2010<!--webbot bot="Timestamp" endspan i-checksum="40536" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->20 February, 2011<!--webbot bot="Timestamp" endspan i-checksum="40524" --></p>
<p>© Copyright Beman Dawes, 2002</p>
<p> Use, modification, and distribution are subject to the Boost Software
License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">
Modified: branches/release/libs/filesystem/v3/doc/index.htm
==============================================================================
--- branches/release/libs/filesystem/v3/doc/index.htm (original)
+++ branches/release/libs/filesystem/v3/doc/index.htm 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -25,8 +25,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -483,7 +483,7 @@
<hr>
<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->06 December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38640" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->20 February, 2011<!--webbot bot="Timestamp" endspan i-checksum="40524" --></p>
<p>© Copyright Beman Dawes, 2002-2005</p>
<p> Use, modification, and distribution are subject to the Boost Software
Modified: branches/release/libs/filesystem/v3/doc/portability_guide.htm
==============================================================================
--- branches/release/libs/filesystem/v3/doc/portability_guide.htm (original)
+++ branches/release/libs/filesystem/v3/doc/portability_guide.htm 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -18,8 +18,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -228,7 +228,7 @@
<hr>
<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 February, 2010<!--webbot bot="Timestamp" endspan i-checksum="40536" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->20 February, 2011<!--webbot bot="Timestamp" endspan i-checksum="40524" --></p>
<p>© Copyright Beman Dawes, 2002, 2003</p>
<p> Use, modification, and distribution are subject to the Boost Software
Modified: branches/release/libs/filesystem/v3/doc/reference.html
==============================================================================
--- branches/release/libs/filesystem/v3/doc/reference.html (original)
+++ branches/release/libs/filesystem/v3/doc/reference.html 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -26,8 +26,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -66,8 +66,8 @@
path iterators<br>
path deprecated functions<br>
path non-member functions<br>
- path inserters and extractors<span style="background-color: #FFFFFF"><br>
-</span> Class filesystem_error<br>
+ path inserters and extractors<br>
+ Class filesystem_error<br>
<a href="#filesystem_error-members">filesystem_error
constructors</a><br>
filesystem_error path1<br>
@@ -142,15 +142,16 @@
and directories. Other types of files, such as symbolic links, may be supported by the
implementation.</p>
<p><b><i><a name="File-system">File system</a>:</i></b> A collection of files and certain of their attributes.</p>
-<p><b><i><a name="Filename">Filename</a>:</i></b> The name of a file. Slash and 0
+<p><b><i><a name="Filename">Filename</a>:</i></b> The name of a file. Slash and
+0x00
characters are not permitted. Implementations may define additional
characters or specific names that are not permitted. Filenames <code>.</code>
and <code>..</code> have special meaning. Implementations may define
additional filenames that have special meaning.</p>
<blockquote>
- <p><i>[Note:</i> Most operating systems prohibit the ANSI control characters
- (0x00-0x31) in filenames.</p>
- <p>Windows prohibits the characters 0x00-0x31, <code>"</code>,<code>
+ <p><i>[Note:</i> Most operating systems prohibit the ASCII control characters
+ (0x00-0x1F) in filenames.</p>
+ <p>Windows prohibits the characters 0x00-0x1F, <code>"</code>,<code>
*</code>,<code> :</code>,<code> <</code>,<code> ></code>,<code> ?</code>,<code>
\</code>,<code> /</code>, and<code> |</code> <i>--end note]</i></p>
</blockquote>
@@ -310,11 +311,10 @@
std::istream& operator>>( std::istream& is, path& p );
std::wistream& operator>>( std::wistream& is, path& p )
- <span style="background-color: #FFFFFF">class filesystem_error;</span><span style="background-color: #FFFF00">
-</span>
- <span style="background-color: #FFFFFF">class directory_entry;
+ class filesystem_error;
+ class directory_entry;
-</span> class directory_iterator;
+ class directory_iterator;
class recursive_directory_iterator;
@@ -325,7 +325,7 @@
class file_status;
- <span style="background-color: #FFFFFF">struct <a name="space_info">space_info</a> // returned by </span>space<span style="background-color: #FFFFFF"> function
+ struct <a name="space_info">space_info</a> // returned by space function
{
uintmax_t capacity;
uintmax_t free;
@@ -350,7 +350,7 @@
// operational functions
-</span> path absolute(const path& p, const path& base=current_path());
+ path absolute(const path& p, const path& base=current_path());
void copy(const path& from, const path& to);
void copy(const path& from, const path& to, system::error_code& ec);
@@ -373,16 +373,16 @@
bool create_directory(const path& p);
bool create_directory(const path& p, system::error_code& ec);
-<span style="background-color: #FFFFFF"> void create_directory_symlink(const path& to, const path& </span>new_symlink<span style="background-color: #FFFFFF">);
- void create_directory_symlink(const path& to, const path& </span>new_symlink, system::error_code& ec<span style="background-color: #FFFFFF">);
-</span>
+ void create_directory_symlink(const path& to, const path& new_symlink);
+ void create_directory_symlink(const path& to, const path& new_symlink, system::error_code& ec);
+
void create_hard_link(const path& to, const path& new_hard_link);
void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec);
-<span style="background-color: #FFFFFF"> void create_symlink(const path& to, const path& </span>new_symlink<span style="background-color: #FFFFFF">);
- void create_symlink(const path& to, const path& </span>new_symlink, system::error_code& ec<span style="background-color: #FFFFFF">);
+ void create_symlink(const path& to, const path& new_symlink);
+ void create_symlink(const path& to, const path& new_symlink, system::error_code& ec);
-</span> path current_path();
+ path current_path();
path current_path(system::error_code& ec);
void current_path(const path& p);
void current_path(const path& p, system::error_code& ec);
@@ -394,15 +394,15 @@
bool equivalent(const path& p1, const path& p2);
bool equivalent(const path& p1, const path& p2, system::error_code& ec);
- <span style="background-color: #FFFFFF; ">uintmax_t</span> file_size(const path& p);
- <span style="background-color: #FFFFFF; ">uintmax_t</span> file_size(const path& p, system::error_code& ec);</pre>
-<pre> uintmax_t hard_link_count(const path& p);
+ uintmax_t file_size(const path& p);
+ uintmax_t file_size(const path& p, system::error_code& ec);
+ uintmax_t hard_link_count(const path& p);
uintmax_t hard_link_count(const path& p, system::error_code& ec);
- <span style="background-color: #FFFFFF">const path& initial_path();
- const path& initial_path(</span><code>system::error_code& ec</code><span style="background-color: #FFFFFF">);
+ const path& initial_path();
+ const path& initial_path(<code>system::error_code& ec</code>);
-</span> bool is_directory(file_status s);
+ bool is_directory(file_status s);
bool is_directory(const path& p);
bool is_directory(const path& p, system::error_code& ec);
@@ -441,10 +441,9 @@
void resize_file(const path& p, uintmax_t size);
void resize_file(const path& p, uintmax_t size, system::error_code& ec);
-<span style="background-color: #FFFFFF"> space_info space(const path& p);
- space_info space(const path& p</span>, system::error_code& ec<span style="background-color: #FFFFFF">);
-</span><span style="background-color: #FFFF00">
-</span> file_status status(const path& p);
+ space_info space(const path& p);
+ space_info space(const path& p, system::error_code& ec);
+ file_status status(const path& p);
<a href="#file_status">file_status</a> <a href="#status">status</a>(const path& p, system::error_code& ec);
bool status_known(file_status s);
@@ -573,25 +572,25 @@
void swap(path& rhs);
// native format observers
- const string_type& native() const; // native format, encoding
- const value_type* c_str() const; // native().c_str()
+ const string_type& native() const; // native format, encoding
+ const value_type* c_str() const; // native().c_str()
template <class String>
- String string(const codecvt_type& cvt=codecvt()) const; // native format
+ String string(const codecvt_type& cvt=codecvt()) const; // native format
- const string string(const codecvt_type& cvt=codecvt()) const; // native format
- const wstring wstring(const codecvt_type& cvt=codecvt()) const; // ditto
- const u16string u16string() const; // ditto
- const u32string u32string() const; // ditto
+ const string string(const codecvt_type& cvt=codecvt()) const; // native format
+ const wstring wstring(const codecvt_type& cvt=codecvt()) const; // ditto
+ const u16string u16string() const; // ditto
+ const u32string u32string() const; // ditto
// generic format observers
template <class String>
- String generic_string() const;
+ String generic_string() const;
- const string generic_string(const codecvt_type& cvt=codecvt()) const; // generic format
- const wstring generic_wstring(const codecvt_type& cvt=codecvt()) const; // ditto
- const u16string generic_u16string() const; // ditto
- const u32string generic_u32string() const; // ditto
+ const string generic_string(const codecvt_type& cvt=codecvt()) const; // generic format
+ const wstring generic_wstring(const codecvt_type& cvt=codecvt()) const; // ditto
+ const u16string generic_u16string() const; // ditto
+ const u32string generic_u32string() const; // ditto
// decomposition
path root_name() const;
@@ -623,9 +622,9 @@
iterator begin() const;
iterator end() const;
- // encoding conversion
- static std::locale imbue( const std::locale& loc );
- static const codecvt_type & codecvt();
+ // encoding conversion
+ static std::locale imbue( const std::locale& loc );
+ static const codecvt_type & codecvt();
private:
string_type pathname; // <b><i>exposition only</i></b>
@@ -633,16 +632,37 @@
} // namespace filesystem
} // namespace boost</pre>
-<p><code><a name="value_type">value_type</a></code> is an implementation-defined typedef for the
+<p><code><a name="value_type">value_type</a></code> is an implementation-defined
+<code>typedef</code> for the
character type used by the implementation to represent pathnames.</p>
-<blockquote>
-<p><i>[Note:</i> For POSIX-like implementations, including<b> </b>Unixes, Linux,
-and Mac OS X, <code>path::value_type</code>
-is <code>char</code> .</p>
+<p>If the value type of [<code>begin</code>,<code>end</code>)
+ or <code>source</code> arguments for member functions is not <code>value_type</code>,
+and no <code>cvt</code> argument is supplied, conversion to <code>value_type</code>
+occurs using an imbued locale. This imbued locale is initialized with a <code>
+codecvt</code> facet appropriate for the operating system.</p>
+<blockquote>
+<p>For Apple OS X implementations, <code>path::value_type</code>
+is <code>char</code>. The default imbued locale provides a UTF-8 <code>codecvt</code>
+facet. [<i>Rationale:</i> "All BSD system functions expect their string
+parameters to be in UTF-8 encoding and nothing else." See
+<a href="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html">
+Apple docs</a>. <i>-- end rationale</i>]</p>
<p>For Windows-like implementations, including
<a href="http://www.cygwin.com/">Cygwin</a> and
<a href="http://www.mingw.org/">MinGW</a>, <code>path::value_type</code> is <code>
-wchar_t</code>. <i>--end note]</i></p>
+wchar_t</code>. The default imbued locale provides a <code>codecvt</code> facet
+that invokes Windows <code>MultiByteToWideChar</code> or <code>
+WideCharToMultiByte</code> API's with a codepage of <code>CP_THREAD_ACP</code>
+if Windows <code>AreFileApisANSI()</code>is true, otherwise codepage <code>
+CP_OEMCP</code>. [<i>Rationale:</i> this is the current behavior of C and C++
+programs that perform file operations using narrow character string to identify
+paths. Changing this in the Filesystem library would be too surprising,
+particularly where user input is involved. <i>-- end rationale</i>]</p>
+<p>For all other implementations, including<b> </b>Linux, <code>path::value_type</code>
+is <code>char</code>. The default imbued locale is <code>std::locale("")</code>.
+[<i>Rationale:</i> ISO C specifies this as "the locale-specific native
+environment", while POSIX says it "Specifies an implementation-defined native
+environment." <i>-- end rationale</i></p>
</blockquote>
<p>For member functions described as returning <code>const string</code>, <code>
const wstring</code>, <code>const u16string</code>, or <code>const u32string</code>,
@@ -672,7 +692,7 @@
wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</li>
<li>A <code>boost::filesystem::directory_entry</code>.</li>
</ul>
-<p>The specifications for certain <code>path</code> functions require that
+<p>The specifications for <code>path</code> functions require that
arguments in the generic pathname format be converted to native pathname format
as they are stored in <code>pathname</code>. If the native format requires
regular file paths and directory paths to be formatted differently, the
@@ -684,7 +704,7 @@
path constructed from <code>"/cats/jane/"</code> would be considered a
directory path, and have a native format of <code>"[CATS.JANE]"</code>.
<i>--end example</i>] [<i>Note</i>: POSIX and Windows use the same native format
-for regular file and directory pathnames, so this paragraph does not apply to
+for both regular file and directory pathnames, so this paragraph does not apply to
them. <i>--end note</i>]</p>
<table align="center" border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="90%">
@@ -725,8 +745,9 @@
<blockquote>
<p><i>Effects:</i> Stores the contents [<code>begin</code>,<code>end</code>)
or <code>source</code> in <code>pathname</code>. If the contents are in the
- generic format, they are converted to the native format. [<i>Note:</i> For
- POSIX and Windows based implementations, the generic format is already
+ generic format and the generic format is unacceptable to the operating
+ system's API, they are converted to the native format. [<i>Note:</i> For
+ POSIX and Windows implementations, the generic format is already
acceptable as a native format, so no generic to native conversion is
performed. <i>--end note</i>]</p>
<p>
@@ -846,41 +867,41 @@
<code>new_extension</code>.</p>
<p><i>Returns:</i> <code>*this</code></p>
</blockquote>
-<pre><code><span style="background-color: #FFFFFF">void <a name="path-swap">swap</a>(path& rhs);</span></code></pre>
+<pre><code>void <a name="path-swap">swap</a>(path& rhs);</code></pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- Swaps the contents of the two paths.</span></p>
- <p><i><span style="background-color: #FFFFFF">Throws: </span></i>
- <span style="background-color: #FFFFFF">nothing.</span></p>
- <p><i><span style="background-color: #FFFFFF">Complexity: </span></i>
- <span style="background-color: #FFFFFF">constant time.</span></p>
+ <p><i>Effects:</i>
+ Swaps the contents of the two paths.</p>
+ <p><i>Throws: </i>
+ nothing.</p>
+ <p><i>Complexity: </i>
+ constant time.</p>
</blockquote>
<h3> <a name="path-native-format-observers"><code><font size="4">path</font></code>
native format observers</a></h3>
<p>The string returned by all native format observers is in the
<a href="#native-pathname-format">native pathname format</a>.</p>
-<pre>const string_type& native() const;</pre>
+<pre>const string_type& <a name="native">native</a>() const;</pre>
<blockquote>
<p><i>Returns:</i> <code>pathname</code>.</p>
<p><i>Throws:</i> nothing.</p>
</blockquote>
-<pre>const value_type* c_str() const;</pre>
+<pre>const value_type* <a name="c_str">c_str</a>() const;</pre>
<blockquote>
<p><i>Returns:</i> <code>pathname.c_str()</code>.</p>
<p><i>Throws:</i> nothing.</p>
</blockquote>
<pre>template <class String>
-String string(const codecvt_type& cvt=codecvt()) const;</pre>
+String <a name="string-template">string</a>(const codecvt_type& cvt=codecvt()) const;</pre>
<blockquote>
<p><i>Returns:</i> <code>pathname</code>.</p>
<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>
String</code>, conversion is performed by <code>cvt</code>.</p>
</blockquote>
-<pre>const string string(const codecvt_type& cvt=codecvt()) const;
-const wstring wstring(const codecvt_type& cvt=codecvt()) const;
-const u16string u16string() const;
-const u32wstring u32wstring() const; </pre>
+<pre>const string <a name="string">string</a>(const codecvt_type& cvt=codecvt()) const;
+const wstring <a name="wstring">wstring</a>(const codecvt_type& cvt=codecvt()) const;
+const u16string <a name="u16string">u16string</a>() const;
+const u32wstring <a name="u32wstring">u32wstring</a>() const; </pre>
<blockquote>
<p><i>Returns:</i> <code>pathname</code>.</p>
<p><i>Remarks:</i> If <code>string_type</code> is a different type than
@@ -899,17 +920,17 @@
generic format are the same. For Windows, backslashes are converted to slashes
<i>--end note</i>]</p>
<pre>template <class String>
-String generic_string(const codecvt_type& cvt=codecvt()) const;</pre>
+String <a name="generic_string-template">generic_string</a>(const codecvt_type& cvt=codecvt()) const;</pre>
<blockquote>
<p><i>Returns:</i> <code>pathname</code>.</p>
<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>
String</code>, conversion is performed by
<code>cvt</code>.</p>
</blockquote>
-<pre>const string generic_string(const codecvt_type& cvt=codecvt()) const;
-const wstring generic_wstring(const codecvt_type& cvt=codecvt()) const;
-const u16string generic_u16string() const;
-const u32wstring generic_u32wstring() const; </pre>
+<pre>const string <a name="generic_string">generic_string</a>(const codecvt_type& cvt=codecvt()) const;
+const wstring <a name="generic_wstring">generic_wstring</a>(const codecvt_type& cvt=codecvt()) const;
+const u16string <a name="generic_u16string">generic_u16string</a>() const;
+const u32wstring <a name="generic_u32wstring">generic_u32wstring</a>() const; </pre>
<blockquote>
<p><i>Returns:</i> <code>pathname</code>.</p>
<p><i>Remarks:</i> If <code>string_type</code> is a different type than
@@ -1048,15 +1069,15 @@
</blockquote>
<pre>bool <a name="path-is_absolute">is_absolute</a>() const;</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>true</code>
- if the elements of <code>root_path()</code> uniquely identify a directory, else <code>false</code>.</span></p>
- <p><span style="background-color: #FFFFFF">[<i>Note:</i> On POSIX,<code>
+ <p><i>Returns:</i> <code>true</code>
+ if the elements of <code>root_path()</code> uniquely identify a directory, else <code>false</code>.</p>
+ <p>[<i>Note:</i> On POSIX,<code>
path("/foo").is_absolute()</code> returns <code>true</code>. On Windows, <code>
- path("/foo").is_absolute()</code> returns <code>false</code>. <i>--end note</i>]</span></p>
+ path("/foo").is_absolute()</code> returns <code>false</code>. <i>--end note</i>]</p>
</blockquote>
<pre>bool <a name="path-is_relative">is_relative</a>() const;</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>!is_absolute()</code>.</span></p>
+ <p><i>Returns:</i> <code>!is_absolute()</code>.</p>
</blockquote>
<h3> <a name="path-iterators"> <code>
<font size="4">path</font></code> iterators</a></h3>
@@ -1084,6 +1105,19 @@
<blockquote>
<p><i>Returns:</i> The end iterator.</p>
</blockquote>
+ <h3><a name="path_encoding"><code><font size="4"> path</font></code> encoding</a> conversion</h3>
+ <pre>static std::locale <a name="path-imbue">imbue</a>(const std::locale& loc);</pre>
+<blockquote>
+ <p><i>Effects:</i> Stores <code>loc</code> as the default locale for all
+ objects of type <code>path</code>.</p>
+ <p><i>Returns:</i> The previous default locale for all objects of type <code>
+ path</code>.</p>
+</blockquote>
+<pre>static const codecvt_type& <a name="path-codecvt">codecvt</a>();</pre>
+<blockquote>
+ <p><i>Returns:</i> The <code>codecvt</code> facet for the default locale for
+ all objects of type <code>path</code>.</p>
+</blockquote>
<h3> <a name="path-deprecated-functions"><code><font size="4"> path</font></code> deprecated functions</a></h3>
<p> Several member functions from previous versions of <code>class path</code>
have been deprecated, either because they have been renamed or because the
@@ -1108,11 +1142,11 @@
const string_type external_directory_string() const { return native(); }</pre>
</blockquote>
<h3> <a name="path-non-member-functions"> <code><font size="4">path</font></code>
-<span style="background-color: #FFFFFF">non-member functions</span></a></h3>
-<pre><span style="background-color: #FFFFFF">void swap( path& lhs, path& rhs )</span></pre>
+non-member functions</a></h3>
+<pre>void swap( path& lhs, path& rhs )</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects: </span></i><code>
- <span style="background-color: #FFFFFF">lhs.swap(rhs)</span></code>.</p>
+ <p><i>Effects: </i><code>
+ lhs.swap(rhs)</code>.</p>
</blockquote>
<pre>bool lexicographical_compare(path::iterator first1, path::iterator last1,
path::iterator first2, path::iterator last2)</pre>
@@ -1184,8 +1218,8 @@
<blockquote>
<p><i>Returns:</i> <code>path(lhs) /= rhs</code>.</p>
</blockquote>
-<h3> <a name="path-non-member-operators"><code><font size="4">path</font></code></a><a name="path-inserter-extractor"><span style="background-color: #FFFFFF"> inserter
- and extractor</span></a></h3>
+<h3> <a name="path-non-member-operators"><code><font size="4">path</font></code></a><a name="path-inserter-extractor"> inserter
+ and extractor</a></h3>
<p> The inserter and extractor delimit the string with double-quotes (<code>"</code>)
to ensure that paths with embedded spaces will round trip correctly. Ampersand (<code>&</code>)
is used as an escape character, so the path can itself contain double quotes.</p>
@@ -1193,38 +1227,38 @@
std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os, const path& p)
</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
+ <p><i>Effects:</i>
<code>os << <a href="../../../io/doc/quoted_manip.html">
- boost::io::quoted</a>(p.string<std::basic_string<Char>>(), static_cast<Char>('&'));</code></span></p>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">os</span></code></p>
+ boost::io::quoted</a>(p.string<std::basic_string<Char>>(), static_cast<Char>('&'));</code></p>
+ <p><i>Returns:</i>
+ <code>os</code></p>
</blockquote>
<pre>template <class Char, class Traits>
inline std::basic_istream<Char, Traits>& operator>>(std::basic_istream<Char, Traits>& is, path& p)
</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Effects: </i>
+ <p><i>Effects: </i>
<code> std::basic_string<Char> str;<br>
is >>
<a href="../../../io/doc/quoted_manip.html">boost::io::quoted</a>(str,
static_cast<Char>('&'));<br>
- p = str;</code></span></p>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">is</span></code></p>
+ p = str;</code></p>
+ <p><i>Returns:</i>
+ <code>is</code></p>
</blockquote>
<h3><a name="Class-filesystem_error">Class <code>filesystem_error</code></a></h3>
<pre> namespace boost
{
namespace filesystem
{
- class basic_filesystem_error : public <span style="background-color: #FFFFFF">system</span>_error
+ class basic_filesystem_error : public system_error
{
public:
filesystem_error();
filesystem_error(const filesystem_error&);
- filesystem_error(const std::string& <span style="background-color: #FFFFFF">what_arg</span>, system::error_code ec);
- filesystem_error(const std::string& <span style="background-color: #FFFFFF">what_arg</span>, const path& p1, system::error_code ec);
- filesystem_error(const std::string& <span style="background-color: #FFFFFF">what_arg</span>, const path& p1, const path& p2, system::error_code ec);
+ filesystem_error(const std::string& what_arg, system::error_code ec);
+ filesystem_error(const std::string& what_arg, const path& p1, system::error_code ec);
+ filesystem_error(const std::string& what_arg, const path& p1, const path& p2, system::error_code ec);
filesystem_error& filesystem_error(const filesystem_error&);
~filesystem_error();
@@ -1242,7 +1276,7 @@
objects thrown as exceptions to report file system errors from functions described in this
clause.</p>
<h4> <a name="filesystem_error-members"> <code>filesystem_error</code> members</a></h4>
-<pre><a name="filesystem_error-2-arg">filesystem_error</a>(const std::string& <span style="background-color: #FFFFFF">what_arg</span>, error_code ec);</pre>
+<pre><a name="filesystem_error-2-arg">filesystem_error</a>(const std::string& what_arg, error_code ec);</pre>
<blockquote>
<p><i>Postcondition:</i></p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="46%">
@@ -1252,9 +1286,9 @@
</tr>
<tr>
<td width="18%" bgcolor="#FFFFFF"><code>
- <span style="background-color: #FFFFFF">runtime_error::what</span>()</code></td>
- <td width="82%" bgcolor="#FFFFFF"><span style="background-color: #FFFFFF">
- <code><i>what_arg</i>.c_str()</code></span></td>
+ runtime_error::what()</code></td>
+ <td width="82%" bgcolor="#FFFFFF">
+ <code><i>what_arg</i>.c_str()</code></td>
</tr>
<tr>
<td width="18%"><code>code()</code></td>
@@ -1270,7 +1304,7 @@
</tr>
</table>
</blockquote>
-<pre><a name="filesystem_error-3-arg">filesystem_error</a>(const std::string& <span style="background-color: #FFFFFF">what_arg</span>, const path_type& p1, error_code ec);</pre>
+<pre><a name="filesystem_error-3-arg">filesystem_error</a>(const std::string& what_arg, const path_type& p1, error_code ec);</pre>
<blockquote>
<p><i>Postcondition:</i></p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="46%">
@@ -1280,9 +1314,9 @@
</tr>
<tr>
<td width="18%" valign="top"><code>
- <span style="background-color: #FFFFFF">runtime_error::what</span>()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">
- <code><i>what_arg</i>.c_str()</code></span></td>
+ runtime_error::what()</code></td>
+ <td width="82%">
+ <code><i>what_arg</i>.c_str()</code></td>
</tr>
<tr>
<td width="18%" valign="top"><code>code()</code></td>
@@ -1290,8 +1324,8 @@
</tr>
<tr>
<td width="18%" valign="top"><code>path1()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">Reference to stored copy of
- </span> <code>p1</code></td>
+ <td width="82%">Reference to stored copy of
+ <code>p1</code></td>
</tr>
<tr>
<td width="18%" valign="top"><code>path2().empty()</code></td>
@@ -1299,7 +1333,7 @@
</tr>
</table>
</blockquote>
-<pre><a name="filesystem_error-4-arg">filesystem_error</a>(const std::string& <span style="background-color: #FFFFFF">what_arg</span>, const path_type& p1, const path_type& p2, error_code ec);</pre>
+<pre><a name="filesystem_error-4-arg">filesystem_error</a>(const std::string& what_arg, const path_type& p1, const path_type& p2, error_code ec);</pre>
<blockquote>
<p><i>Postcondition:</i></p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="46%">
@@ -1309,10 +1343,10 @@
</tr>
<tr>
<td width="18%"><code>
- <span style="background-color: #FFFFFF">runtime_error::what</span>()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">
+ runtime_error::what()</code></td>
+ <td width="82%">
<u>
- <code><i>w</i></code></u><code><i>hat_arg</i>.c_str()</code></span></td>
+ <code><i>w</i></code></u><code><i>hat_arg</i>.c_str()</code></td>
</tr>
<tr>
<td width="18%"><code>code()</code></td>
@@ -1320,13 +1354,13 @@
</tr>
<tr>
<td width="18%"><code>path1()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">Reference to stored copy of
- </span> <code>p1</code></td>
+ <td width="82%">Reference to stored copy of
+ <code>p1</code></td>
</tr>
<tr>
<td width="18%"><code>path2()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">Reference to stored copy of
- </span> <code>p2</code></td>
+ <td width="82%">Reference to stored copy of
+ <code>p2</code></td>
</tr>
</table>
</blockquote>
@@ -1360,17 +1394,19 @@
// constructors and destructor
directory_entry();
directory_entry(const directory_entry&);
- explicit directory_entry(const path_type& p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());
+ explicit directory_entry(const path_type& p, file_status st=file_status(), file_status symlink_st=file_status());
~directory_entry();
// modifiers
directory_entry& operator=(const directory_entry&);
- void assign(const path_type& p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());
- void replace_filename(const path& p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());
+ void assign(const path_type& p, file_status st=file_status(), file_status symlink_st=file_status());
+ void replace_filename(const path& p, file_status st=file_status(), file_status symlink_st=file_status());
// observers
const path& path() const;
-<span style="background-color: #FFFFFF"> file_status status(system::error_code& ec) const;
+ file_status status() const;
+ file_status status(system::error_code& ec) const;
+ file_status symlink_status() const;
file_status symlink_status(system::error_code& ec) const;
bool operator< (const directory_entry& rhs);
@@ -1380,11 +1416,10 @@
bool operator<=(const directory_entry& rhs);
bool operator> (const directory_entry& rhs);
bool operator>=(const directory_entry& rhs);
-</span><span style="background-color: #FFFF00">
-</span> private:
+ private:
path_type m_path; // for exposition only
- mutable <span style="background-color: #FFFFFF">file_status</span> m_status; // for exposition only; stat()-like
- mutable <span style="background-color: #FFFFFF">file_status</span> m_symlink_status; // for exposition only; lstat()-like
+ mutable file_status m_status; // for exposition only; stat()-like
+ mutable file_status m_symlink_status; // for exposition only; lstat()-like
};
} // namespace filesystem
@@ -1427,7 +1462,7 @@
</tr>
</table>
</blockquote>
-<pre>explicit directory_entry(const path_type& p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());</pre>
+<pre>explicit directory_entry(const path_type& p, file_status st=file_status(), file_status symlink_st=file_status());</pre>
<blockquote>
<p><i>Postcondition:</i></p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%">
@@ -1450,7 +1485,7 @@
</table>
</blockquote>
<h4> <a name="directory_entry-modifiers"> <code>directory_entry </code>modifiers</a></h4>
-<pre>void assign(const path_type& p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());</pre>
+<pre>void assign(const path_type& p, file_status st=file_status(), file_status symlink_st=file_status());</pre>
<blockquote>
<p><i>Postcondition:</i></p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%">
@@ -1472,7 +1507,7 @@
</tr>
</table>
</blockquote>
-<pre>void replace_filename(const path& p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());</pre>
+<pre>void replace_filename(const path& p, file_status st=file_status(), file_status symlink_st=file_status());</pre>
<blockquote>
<p><i>Postcondition:</i></p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="43%">
@@ -1499,64 +1534,75 @@
<blockquote>
<p><i>Returns:</i> <code>m_path</code></p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">file_status status(system::error_code& ec) const;</span></pre>
+<pre>file_status status() const;
+file_status status(system::error_code& ec) const;</pre>
<blockquote>
-<p><span style="font-style: italic; background-color: #FFFFFF">Effects:</span><span style="background-color: #FFFFFF">
-As if,</span></p>
+<p><i>Effects:</i>
+As if,</p>
<blockquote>
- <pre><span style="background-color: #FFFFFF">if ( !status_known( m_status ) )
+ <pre>if ( !status_known( m_status ) )
{
if ( status_known(m_symlink_status) && !is_symlink(m_symlink_status) )
{ m_status = m_symlink_status; }
- else { m_status = status(m_path, ec); }
-}
-else if ( &ec != &boost::throws() ) ec.clear();</span></pre>
+ else { m_status = status(m_path<i>[, ec]</i>); }
+}</pre>
</blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_status</code></span></p>
+ <p><i>Returns:</i> <code>m_status</code></p>
+
+ <p><i>Throws:</i> As specified in
+ <a href="#Error-reporting">
+ Error reporting</a>.</p>
+
</blockquote>
-<pre><span style="background-color: #FFFFFF">file_status symlink_status(system::error_code& ec) const;</span></pre>
+<pre>file_status symlink_status() const;
+file_status symlink_status(system::error_code& ec) const;</pre>
<blockquote>
-<p><span style="font-style: italic; background-color: #FFFFFF">Effects:</span><span style="background-color: #FFFFFF">
-As if,</span></p>
+<p>
+ <i>Effects:</i>
+As if,</p>
<blockquote>
- <pre><span style="background-color: #FFFFFF">if ( !status_known( m_symlink_status ) )
+ <pre>if ( !status_known( m_symlink_status ) )
{
- m_symlink_status = symlink_status(m_path, ec);
-}
-else if ( &ec != &boost::throws() ) ec.clear();</span></pre>
+ m_symlink_status = symlink_status(m_path<i>[, ec]</i>);
+}</pre>
</blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>
- m_symlink_status</code></span></p>
+ <p><i>Returns:</i> <code>
+ m_symlink_status</code></p>
+
+ <p><i>Throws:</i> As specified in
+ <a href="#Error-reporting">
+ Error reporting</a>.</p>
+
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool operator==(const directory_entry& rhs);</span></pre>
+<pre>bool operator==(const directory_entry& rhs);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_path ==
- rhs.m_path</code>.</span></p>
+ <p><i>Returns:</i> <code>m_path ==
+ rhs.m_path</code>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool operator!=(const directory_entry& rhs);</span></pre>
+<pre>bool operator!=(const directory_entry& rhs);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_path !=
- rhs.m_path</code>.</span></p>
+ <p><i>Returns:</i> <code>m_path !=
+ rhs.m_path</code>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool operator< (const directory_entry& rhs);</span></pre>
+<pre>bool operator< (const directory_entry& rhs);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_path <
- rhs.m_path</code>.</span></p>
+ <p><i>Returns:</i> <code>m_path <
+ rhs.m_path</code>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool operator<=(const directory_entry& rhs);</span></pre>
+<pre>bool operator<=(const directory_entry& rhs);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_path <=
- rhs.m_path</code>.</span></p>
+ <p><i>Returns:</i> <code>m_path <=
+ rhs.m_path</code>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool operator> (const directory_entry& rhs);</span></pre>
+<pre>bool operator> (const directory_entry& rhs);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_path >
- rhs.m_path</code>.</span></p>
+ <p><i>Returns:</i> <code>m_path >
+ rhs.m_path</code>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool operator>=(const directory_entry& rhs);</span></pre>
+<pre>bool operator>=(const directory_entry& rhs);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_path >=
- rhs.m_path</code>.</span></p>
+ <p><i>Returns:</i> <code>m_path >=
+ rhs.m_path</code>.</p>
</blockquote>
<h3><a name="Class-directory_iterator">Class <code>directory_iterator</code></a></h3>
<p>Objects of type <code>directory_iterator</code> provide standard library
@@ -1967,8 +2013,8 @@
<pre>void <a name="copy_file">copy_file</a>(const path& from, const path& to, BOOST_SCOPED_ENUM(copy_option) option);
void <a name="copy_file2">copy_file</a>(const path& from, const path& to, BOOST_SCOPED_ENUM(copy_option) option, system::error_code& ec);</pre>
<blockquote>
- <p><i>Effects:</i> If <code>option == copy_option::</code><span style="background-color: #FFFFFF"><code>fail_if_exists
- && exists(to)</code>, an error is reported. Otherwise, t</span>he contents and attributes of the file <code>from</code>
+ <p><i>Effects:</i> If <code>option == copy_option::</code><code>fail_if_exists
+ && exists(to)</code>, an error is reported. Otherwise, the contents and attributes of the file <code>from</code>
resolves to are copied to the file <code>to</code> resolves to.</p>
<p><i>Throws:</i> As specified in
<a href="#Error-reporting">
@@ -2011,27 +2057,27 @@
<a href="#Error-reporting">
Error reporting</a>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">void <a name="create_directory_symlink">create_directory_symlink</a>(const path& to, const path& new_symlink);
-void create_directory_symlink(const path& to, const path& new_symlink, system::error_code& ec);</span></pre>
+<pre>void <a name="create_directory_symlink">create_directory_symlink</a>(const path& to, const path& new_symlink);
+void create_directory_symlink(const path& to, const path& new_symlink, system::error_code& ec);</pre>
<blockquote style="font-size: 10pt">
- <p style="font-size: 10pt"><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- Establishes the postcondition, as if by </span><i>
- <span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF">
- </span><code><span style="background-color: #FFFFFF">
+ <p style="font-size: 10pt"><i>Effects:</i>
+ Establishes the postcondition, as if by <i>
+ POSIX</i>
+ <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></span></code><span style="background-color: #FFFFFF">.</span></p>
- <p style="font-size: 10pt"><span style="background-color: #FFFFFF"><i>
+ symlink()</a></code>.</p>
+ <p style="font-size: 10pt"><i>
Postcondition:</i> <code>new_symlink</code> resolves to a symbolic link file that
- contains an unspecified representation of <code>to</code>.</span></p>
+ contains an unspecified representation of <code>to</code>.</p>
<p style="font-size: 10pt"><i>Throws:</i> As specified in
<a href="#Error-reporting">
Error reporting</a>.</p>
- <p style="font-size: 10pt"><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
+ <p style="font-size: 10pt">[<i>Note:</i>
Some <b>operating systems</b>, such as Windows, require symlink creation to
identify that the link is to a directory. Portable code should use <code>
create_directory_symlink()</code> to create directory symlinks rather than
- <code>create_symlink()</code> </span> <i><span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
+ <code>create_symlink()</code> <i>-- end note</i>]</p>
+ <p>[<i>Note:</i>
Some <b>operating systems</b> do not support symbolic links at all or support
them only for regular files. Windows prior to Vista, for example, did not
support symbolic links.
@@ -2040,52 +2086,52 @@
symbolic links regardless of the operating system - the FAT system used on floppy discs, memory cards and flash
drives,
for example. Thus symbolic links should only be used if these situations are
- not concerns, or if workarounds are provided. </span> <i><span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
+ not concerns, or if workarounds are provided. <i>-- end note</i>]</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">void <a name="create_hard_link">create_hard_link</a>(const path& to, const path& new_hard_link);
-void <a name="create_hard_link2">create_hard_link</a>(const path& to, const path& new_hard_link, system::error_code& ec);</span></pre>
+<pre>void <a name="create_hard_link">create_hard_link</a>(const path& to, const path& new_hard_link);
+void <a name="create_hard_link2">create_hard_link</a>(const path& to, const path& new_hard_link, system::error_code& ec);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF"> Establishes the postcondition, as if by
- </span> <i><span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF">
- </span> <code>
+ <p><i>Effects:</i> Establishes the postcondition, as if by
+ <i>POSIX</i>
+ <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/functions/link.html">
- <span style="background-color: #FFFFFF">link()</span></a></code><span style="background-color: #FFFFFF">.</span></p>
- <p><i><span style="background-color: #FFFFFF">Postcondition:</span></i></p>
+ link()</a></code>.</p>
+ <p><i>Postcondition:</i></p>
<ul>
- <li><span style="background-color: #FFFFFF"> </span><code><span style="background-color: #FFFFFF">exists(to) &&
- exists(</span></code><span style="background-color: #FFFFFF"><code>new_hard_link</code></span><code><span style="background-color: #FFFFFF">) && equivalent(to,
+ <li> <code>exists(to) &&
+ exists(</code><code>new_hard_link</code><code>) && equivalent(to,
- </span></code><span style="background-color: #FFFFFF"><code>new_hard_link</code></span><code><span style="background-color: #FFFFFF">)</span></code></li>
- <li><span style="background-color: #FFFFFF">The contents of the file or directory
- <code>to</code> resolves to are unchanged.</span></li>
+ </code><code>new_hard_link</code><code>)</code></li>
+ <li>The contents of the file or directory
+ <code>to</code> resolves to are unchanged.</li>
</ul>
<p><i>Throws:</i> As specified in
<a href="#Error-reporting">
Error reporting</a>.</p>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
+ <p>[<i>Note:</i>
Some <b>operating systems</b> do not support hard links at all or support
them only for regular files. Some <b>file systems</b> do not support hard
links regardless of the operating system - the FAT system used on floppy
discs, memory cards and flash drives, for example. Some file systems limit the
number of links per file. Thus hard links should only be used if these
- situations are not concerns, or if workarounds are provided. </span> <i><span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
+ situations are not concerns, or if workarounds are provided. <i>-- end note</i>]</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">void <a name="create_symlink">create_symlink</a>(const path& to, const path& new_symlink);
-void <a name="create_symlink2">create_symlink</a>(const path& to, const path& new_symlink, system::error_code& ec);</span></pre>
+<pre>void <a name="create_symlink">create_symlink</a>(const path& to, const path& new_symlink);
+void <a name="create_symlink2">create_symlink</a>(const path& to, const path& new_symlink, system::error_code& ec);</pre>
<blockquote style="font-size: 10pt">
- <p style="font-size: 10pt"><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- Establishes the postcondition, as if by </span><i>
- <span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF">
- </span><code><span style="background-color: #FFFFFF">
+ <p style="font-size: 10pt"><i>Effects:</i>
+ Establishes the postcondition, as if by <i>
+ POSIX</i>
+ <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></span></code><span style="background-color: #FFFFFF">.</span></p>
- <p style="font-size: 10pt"><span style="background-color: #FFFFFF"><i>
+ symlink()</a></code>.</p>
+ <p style="font-size: 10pt"><i>
Postcondition:</i> <code>new_symlink</code> resolves to a symbolic link file that
- contains an unspecified representation of <code>to</code>.</span></p>
+ contains an unspecified representation of <code>to</code>.</p>
<p style="font-size: 10pt"><i>Throws:</i> As specified in
<a href="#Error-reporting">
Error reporting</a>.</p>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
+ <p>[<i>Note:</i>
Some <b>operating systems</b> do not support symbolic links at all or support
them only for regular files. Windows prior to Vista, for example, did not
support symbolic links.
@@ -2094,7 +2140,7 @@
symbolic links regardless of the operating system - the FAT system used on floppy discs, memory cards and flash
drives,
for example. Thus symbolic links should only be used if these situations are
- not concerns, or if workarounds are provided. </span> <i><span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
+ not concerns, or if workarounds are provided. <i>-- end note</i>]</p>
</blockquote>
<pre>path <a name="current_path">current_path</a>();
path <a name="current_path2">current_path</a>(system::error_code& ec);</pre>
@@ -2116,12 +2162,12 @@
<pre>void current_path(const path& p);
void current_path(const path& p, system::error_code& ec);</pre>
<blockquote>
- <p style="font-size: 10pt"><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- Establishes the postcondition, as if by </span><i>
- <span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF">
- </span><code><span style="background-color: #FFFFFF">
+ <p style="font-size: 10pt"><i>Effects:</i>
+ Establishes the postcondition, as if by <i>
+ POSIX</i>
+ <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/functions/chdir.html">
- chdir()</a></span></code><span style="background-color: #FFFFFF">.</span></p>
+ chdir()</a></code>.</p>
<p><i>Postcondition:</i> <code>equivalent(p, current_path())</code>.</p>
<p><i>Throws:</i> As specified in
<a href="#Error-reporting">
@@ -2130,10 +2176,10 @@
global state. It may be changed unexpectedly by a third-party or system
library functions, or by another thread. <i>-- end note</i>]</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool <a name="exists">exists</a>(file_status s);</span></pre>
+<pre>bool <a name="exists">exists</a>(file_status s);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>status_known(s) && s.type() != file_not_found</code></span></p>
+ <p><i>Returns:</i>
+ <code>status_known(s) && s.type() != file_not_found</code></p>
<p><i>Throws:</i> Nothing.</p>
</blockquote>
<pre>bool <a name="exists2">exists</a>(const path& p);
@@ -2173,20 +2219,22 @@
<code>nFileSizeLow</code>, <code>ftLastWriteTime.dwLowDateTime</code>, and
<code>ftLastWriteTime.dwHighDateTime</code>. <i>-- end note</i>]</p>
</blockquote>
- <p style="font-size: 10pt"><i>Throws:</i> <code>filesystem_error</code><span style="background-color: #FFFFFF">
- </span>if <code>(!exists(s1) && !exists(s2)) || (is_other(s1) && is_other(s2))</code>,
+ <p style="font-size: 10pt"><i>Throws:</i> <code>filesystem_error</code>
+ if <code>(!exists(s1) && !exists(s2)) || (is_other(s1) && is_other(s2))</code>,
otherwise as specified in
<a href="#Error-reporting">
Error reporting</a>.</p>
</blockquote>
<div dir="ltr">
-<pre><span style="background-color: #FFFFFF; ">uintmax_t</span> <a name="file_size">file_size</a>(const path& p);<span style="background-color: #FFFFFF; ">
-uintmax_t</span> <a name="file_size2">file_size</a>(const path& p, system::error_code& ec);</pre>
+<pre>uintmax_t <a name="file_size">file_size</a>(const path& p);
+uintmax_t <a name="file_size2">file_size</a>(const path& p, system::error_code& ec);</pre>
</div>
<blockquote>
- <p><span style="background-color: #FFFF00">Remarks: </span></p>
+ <p>
+ <span style="background-color: #FFFF00">Remarks: </span>
+ </p>
<p><i>Returns:</i> If <code>exists(p) && is_regular_file(p)</code>, the size
- <span style="background-color: #FFFFFF; ">in bytes</span>
+ in bytes
of the file <code>p</code> resolves to, determined as if by the value of
the <i>POSIX</i> <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">stat</a></code> structure member <code>st_size</code>
@@ -2208,24 +2256,24 @@
</blockquote>
-<pre><span style="background-color: #FFFFFF">const path& <a name="initial_path">initial_path</a>();
-const path& <a name="initial_path">initial_path</a>(</span><code>system::error_code& ec</code><span style="background-color: #FFFFFF">);</span></pre>
+<pre>const path& <a name="initial_path">initial_path</a>();
+const path& <a name="initial_path">initial_path</a>(<code>system::error_code& ec</code>);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> </span>
+ <p><i>Returns:</i>
<code>current_path()</code> as of the first call to <code>initial_path()</code>.</p>
- <p>[<i><span style="background-color: #FFFFFF">Note:</span></i> <code>
+ <p>[<i>Note:</i> <code>
initial_path()</code> is not thread safe, and may return an undesirable result
if called subsequent to a change to the current directory. These problems can
be avoided by calling <code>initial_path()</code> immediately on entry to
- main(). <i><span style="background-color: #FFFFFF">--end note</span></i>]</p>
+ main(). <i>--end note</i>]</p>
<p><i>Throws:</i> For the first call, as specified in
<a href="#Error-reporting">
Error reporting</a>. Subsequent calls throw nothing.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool </span><code><span style="background-color: #FFFFFF"><a name="is_directory">is_directory</a></span></code><span style="background-color: #FFFFFF">(file_status s);</span></pre>
+<pre>bool <code><a name="is_directory">is_directory</a></code>(file_status s);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> </span>
- <code><span style="background-color: #FFFFFF">s.type() == directory_file</span></code></p>
+ <p><i>Returns:</i>
+ <code>s.type() == directory_file</code></p>
<p><i>Throws:</i> Nothing.</p>
</blockquote>
<pre><code>bool <a name="is_directory2">is_directory</a>(const path& p);
@@ -2273,10 +2321,10 @@
<p><i>Returns:</i> <code>is_regular_file(status(p, ec))</code>.</p>
<p><i>Throws:</i> Nothing.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool <a name="is_other">is_other</a>(file_status s);</span></pre>
+<pre>bool <a name="is_other">is_other</a>(file_status s);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>return exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s)</code></span></p>
+ <p><i>Returns:</i>
+ <code>return exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s)</code></p>
<p><i>Throws:</i> Nothing.</p>
</blockquote>
<pre><code>bool <a name="is_other2">is_other</a>(const path& p);
@@ -2287,10 +2335,10 @@
<p><i>Throws:</i> <code>filesystem_error</code>; overload with <code>error_code&</code> throws
nothing.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool <a name="is_symlink">is_symlink</a>(file_status s);</span></pre>
+<pre>bool <a name="is_symlink">is_symlink</a>(file_status s);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> </span>
- <code><span style="background-color: #FFFFFF">s.type() == symlink_file</span></code></p>
+ <p><i>Returns:</i>
+ <code>s.type() == symlink_file</code></p>
<p><i>Throws:</i> Nothing.</p>
</blockquote>
<pre><code>bool <a name="is_symlink2">is_symlink</a>(const path& p);
@@ -2391,8 +2439,8 @@
<a href="#Error-reporting">
Error reporting</a>.</p>
</blockquote>
-<pre>void <a name="resize_file">resize_file</a>(const path& p, <span style="background-color: #FFFFFF; ">uintmax_t new_size</span>);
-void <a name="resize_file2">resize_file</a>(const path& p, <span style="background-color: #FFFFFF; ">uintmax_t new_size, </span>system::error_code& ec);</pre>
+<pre>void <a name="resize_file">resize_file</a>(const path& p, uintmax_t new_size);
+void <a name="resize_file2">resize_file</a>(const path& p, uintmax_t new_size, system::error_code& ec);</pre>
<blockquote>
<p><i>Postcondition:</i> <code>file_size() == new_size</code>.</p>
<p><i>Throws:</i> As specified in
@@ -2403,12 +2451,12 @@
<a href="http://www.opengroup.org/onlinepubs/000095399/functions/truncate.html">
truncate()</a></code>.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">space_info <a name="space">space</a>(const path& p);
-space_info <a name="space2">space</a>(const path& p</span>, system::error_code& ec<span style="background-color: #FFFFFF">);</span></pre>
+<pre>space_info <a name="space">space</a>(const path& p);
+space_info <a name="space2">space</a>(const path& p, system::error_code& ec);</pre>
<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> An object of type <code>
+ <p><i>Returns:</i> An object of type <code>
<a href="#space_info">space_info</a></code>. The value of the <code>space_info</code> object is determined as if by
- using </span> <i><span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF"> <code>
+ using <i>POSIX</i> <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/functions/statvfs.html" style="text-decoration: none">
statvfs()</a></code> to obtain a <i>POSIX</i> struct <code>
<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/statvfs.h.html" style="text-decoration: none">
@@ -2416,7 +2464,7 @@
f_bfree</code>, and <code>f_bavail</code> members by its <code>f_frsize</code>
member, and assigning the results to the <code>capacity</code>, <code>free</code>,
and <code>available</code> members respectively. Any members for which the
- value cannot be determined shall be set to -1.</span></p>
+ value cannot be determined shall be set to -1.</p>
<p><i>Throws:</i> As specified in
<a href="#Error-reporting">
Error reporting</a>.</p>
@@ -2532,10 +2580,10 @@
resolution,
pathname resolution continues using the contents of the symbolic link.</p>
</blockquote>
-<pre><span style="background-color: #FFFFFF">bool <a name="status_known">status_known</a>(file_status s);</span></pre>
+<pre>bool <a name="status_known">status_known</a>(file_status s);</pre>
<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>s.type() != status_error</code></span></p>
+ <p><i>Returns:</i>
+ <code>s.type() != status_error</code></p>
<p><i>Throws:</i> Nothing.</p>
</blockquote>
<pre>file_status <a name="symlink_status">symlink_status</a>(const path& p);
@@ -3201,7 +3249,7 @@
<tr>
<td width="16%" valign="top">[<a name="ISO_POSIX">ISO-POSIX</a>]</td>
<td width="84%">ISO/IEC 9945:2003, IEEE Std 1003.1-2001, and The Open Group
- Base Specifications, Issue 6. Also known as The Single Unix<font face="Times New Roman">®
+ Base Specifications, Issue 6. Also known as The Single Unix<font face="Times New Roman">î
Specification, Version 3. Available from each of the organizations involved
in its creation. For example, read online or download from
<a href="http://www.unix.org/single_unix_specification/">
@@ -3217,11 +3265,11 @@
</tr>
</table>
<hr>
-<p>© Copyright Beman Dawes, 2002, 2006, 2007, 2009, 2010</p>
+<p>© Copyright Beman Dawes, 2002, 2006, 2007, 2009, 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
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->12 February 2011<!--webbot bot="Timestamp" endspan i-checksum="40670" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->25 February 2011<!--webbot bot="Timestamp" endspan i-checksum="40677" --></p>
</body>
Modified: branches/release/libs/filesystem/v3/doc/tutorial.html
==============================================================================
--- branches/release/libs/filesystem/v3/doc/tutorial.html (original)
+++ branches/release/libs/filesystem/v3/doc/tutorial.html 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -24,8 +24,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -1121,7 +1121,7 @@
<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
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->04 June 2010<!--webbot bot="Timestamp" endspan i-checksum="17550" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->20 February 2011<!--webbot bot="Timestamp" endspan i-checksum="40667" --></p>
</body>
Modified: branches/release/libs/filesystem/v3/doc/v3.html
==============================================================================
--- branches/release/libs/filesystem/v3/doc/v3.html (original)
+++ branches/release/libs/filesystem/v3/doc/v3.html 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -23,8 +23,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -144,7 +144,7 @@
<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
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->02 July 2010<!--webbot bot="Timestamp" endspan i-checksum="18762" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->20 February 2011<!--webbot bot="Timestamp" endspan i-checksum="40667" --></p>
</body>
Modified: branches/release/libs/filesystem/v3/doc/v3_design.html
==============================================================================
--- branches/release/libs/filesystem/v3/doc/v3_design.html (original)
+++ branches/release/libs/filesystem/v3/doc/v3_design.html 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -24,8 +24,8 @@
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
- <td>Boost Home
- Library Home
+ <td>Filesystem Home
+ Releases
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
@@ -180,7 +180,7 @@
<hr>
<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->18 February, 2010<!--webbot bot="Timestamp" endspan i-checksum="40538" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->20 February, 2011<!--webbot bot="Timestamp" endspan i-checksum="40524" --></p>
<p>© Copyright Beman Dawes, 2008</p>
<p> Use, modification, and distribution are subject to the Boost Software
Modified: branches/release/libs/filesystem/v3/src/operations.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/src/operations.cpp (original)
+++ branches/release/libs/filesystem/v3/src/operations.cpp 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -34,6 +34,7 @@
!defined(_STATVFS_ACPP_PROBLEMS_FIXED))
#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
#endif
+#if !defined(__PGI)
#define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX
// 64-bit systems or on 32-bit systems which don't have files larger
// than can be represented by a traditional POSIX/UNIX off_t type.
@@ -44,6 +45,9 @@
// ensure that they are available to all included headers.
// That is required at least on Solaris, and possibly on other
// systems as well.
+#else
+#define _FILE_OFFSET_BITS 64
+#endif
#include <boost/filesystem/v3/operations.hpp>
#include <boost/scoped_array.hpp>
@@ -1694,6 +1698,10 @@
return ok;
}
+#if defined(__PGI) && defined(__USE_FILE_OFFSET64)
+#define dirent dirent64
+#endif
+
error_code dir_itr_first(void *& handle, void *& buffer,
const char* dir, string& target,
fs::file_status &, fs::file_status &)
Modified: branches/release/libs/filesystem/v3/src/path.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/src/path.cpp (original)
+++ branches/release/libs/filesystem/v3/src/path.cpp 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -27,6 +27,7 @@
#include <boost/scoped_array.hpp>
#include <boost/system/error_code.hpp>
#include <boost/assert.hpp>
+#include <algorithm>
#include <cstddef>
#include <cstring>
#include <cassert>
@@ -155,27 +156,17 @@
# ifdef BOOST_WINDOWS_API
- void path::m_portable()
- {
- for (string_type::iterator it = m_pathname.begin();
- it != m_pathname.end(); ++it)
- {
- if (*it == L'\\')
- *it = L'/';
- }
- }
-
const std::string path::generic_string(const codecvt_type& cvt) const
{
path tmp(*this);
- tmp.m_portable();
+ tmp.make_preferred();
return tmp.string(cvt);
}
const std::wstring path::generic_wstring() const
{
path tmp(*this);
- tmp.m_portable();
+ tmp.make_preferred();
return tmp.wstring();
}
@@ -216,12 +207,7 @@
# ifdef BOOST_WINDOWS_API
path & path::make_preferred()
{
- for (string_type::iterator it = m_pathname.begin();
- it != m_pathname.end(); ++it)
- {
- if (*it == L'/')
- *it = L'\\';
- }
+ std::replace(m_pathname.begin(), m_pathname.end(), L'\\', L'/');
return *this;
}
# endif
Modified: branches/release/libs/filesystem/v3/test/fstream_test.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/test/fstream_test.cpp (original)
+++ branches/release/libs/filesystem/v3/test/fstream_test.cpp 2011-03-03 13:00:21 EST (Thu, 03 Mar 2011)
@@ -149,6 +149,9 @@
{
if (argc > 1) cleanup = false;
+ std::cout << "BOOST_FILESYSTEM_C_STR defined as \""
+ << BOOST_STRINGIZE(BOOST_FILESYSTEM_C_STR) << "\"\n";
+
// test narrow characters
std::cout << "narrow character tests:\n";
test("fstream_test_foo");
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