Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49317 - in branches/release: boost/filesystem libs/filesystem/doc libs/filesystem/example libs/filesystem/src libs/filesystem/test libs/filesystem/test/msvc libs/filesystem/test/msvc/convenience_test libs/filesystem/test/msvc/deprecated_test libs/filesystem/test/msvc/fstream_test libs/filesystem/test/msvc/large_file_support_test libs/filesystem/test/msvc/mbcopy libs/filesystem/test/msvc/operations_test libs/filesystem/test/msvc/path_test libs/filesystem/test/msvc/simple_ls libs/filesystem/test/msvc/wide_test
From: bdawes_at_[hidden]
Date: 2008-10-13 10:55:37


Author: bemandawes
Date: 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
New Revision: 49317
URL: http://svn.boost.org/trac/boost/changeset/49317

Log:
Filesystem: merge from trunk
Added:
   branches/release/libs/filesystem/test/deprecated_test.cpp
      - copied unchanged from r49316, /trunk/libs/filesystem/test/deprecated_test.cpp
   branches/release/libs/filesystem/test/msvc/deprecated_test/
      - copied from r49316, /trunk/libs/filesystem/test/msvc/deprecated_test/
   branches/release/libs/filesystem/test/msvc/deprecated_test/deprecated_test.vcproj
      - copied unchanged from r49316, /trunk/libs/filesystem/test/msvc/deprecated_test/deprecated_test.vcproj
Text files modified:
   branches/release/boost/filesystem/config.hpp | 4
   branches/release/boost/filesystem/convenience.hpp | 15 ++
   branches/release/boost/filesystem/operations.hpp | 85 +++++++++++----
   branches/release/boost/filesystem/path.hpp | 22 ++-
   branches/release/libs/filesystem/doc/index.htm | 213 +++++++++++++++++++++++++++++++++++++++
   branches/release/libs/filesystem/doc/reference.html | 6
   branches/release/libs/filesystem/example/mbcopy.cpp | 5
   branches/release/libs/filesystem/example/mbpath.cpp | 2
   branches/release/libs/filesystem/example/mbpath.hpp | 1
   branches/release/libs/filesystem/example/simple_ls.cpp | 19 ++-
   branches/release/libs/filesystem/src/operations.cpp | 6
   branches/release/libs/filesystem/test/Jamfile.v2 | 26 +---
   branches/release/libs/filesystem/test/convenience_test.cpp | 37 ------
   branches/release/libs/filesystem/test/fstream_test.cpp | 3
   branches/release/libs/filesystem/test/large_file_support_test.cpp | 3
   branches/release/libs/filesystem/test/lpath.hpp | 1
   branches/release/libs/filesystem/test/msvc/boost_filesystem.sln | 10 +
   branches/release/libs/filesystem/test/msvc/convenience_test/convenience_test.vcproj | 4
   branches/release/libs/filesystem/test/msvc/fstream_test/fstream_test.vcproj | 4
   branches/release/libs/filesystem/test/msvc/large_file_support_test/large_file_support_test.vcproj | 4
   branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj | 4
   branches/release/libs/filesystem/test/msvc/operations_test/operations_test.vcproj | 4
   branches/release/libs/filesystem/test/msvc/path_test/path_test.vcproj | 4
   branches/release/libs/filesystem/test/msvc/simple_ls/simple_ls.vcproj | 4
   branches/release/libs/filesystem/test/msvc/wide_test/wide_test.vcproj | 4
   branches/release/libs/filesystem/test/operations_test.cpp | 89 ++++++++--------
   branches/release/libs/filesystem/test/path_test.cpp | 118 +--------------------
   branches/release/libs/filesystem/test/wide_test.cpp | 3
   28 files changed, 437 insertions(+), 263 deletions(-)

Modified: branches/release/boost/filesystem/config.hpp
==============================================================================
--- branches/release/boost/filesystem/config.hpp (original)
+++ branches/release/boost/filesystem/config.hpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -60,13 +60,13 @@
 
 // narrow support only for badly broken compilers or libraries -------------//
 
-# if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+# if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) || BOOST_WORKAROUND(__BORLANDC__, <0x610)
 # define BOOST_FILESYSTEM_NARROW_ONLY
 # endif
 
 // enable dynamic linking on Windows ---------------------------------------//
 
-# if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)) && defined(__BORLANDC__) && defined(__WIN32__)
+# if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)) && BOOST_WORKAROUND(__BORLANDC__, <0x610) && defined(__WIN32__)
 # error Dynamic linking Boost.Filesystem does not work for Borland; use static linking instead
 # endif
 

Modified: branches/release/boost/filesystem/convenience.hpp
==============================================================================
--- branches/release/boost/filesystem/convenience.hpp (original)
+++ branches/release/boost/filesystem/convenience.hpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -94,6 +94,7 @@
     inline bool create_directories(const wpath& ph)
       { return create_directories<wpath>(ph); }
 
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
     inline std::string extension(const path& ph)
       { return extension<path>(ph); }
     inline std::wstring extension(const wpath& ph)
@@ -108,6 +109,7 @@
       { return change_extension<path>( ph, new_ex ); }
     inline wpath change_extension( const wpath & ph, const std::wstring& new_ex )
       { return change_extension<wpath>( ph, new_ex ); }
+# endif
 
 # endif
 
@@ -239,10 +241,23 @@
       else if ( is_directory( m_imp->m_stack.top()->status() ) )
       {
         system::error_code ec;
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
+ if( m_imp->m_no_throw ) {
+ m_imp->m_stack.push(
+ basic_directory_iterator<Path>( *m_imp->m_stack.top(), ec )
+ );
+ }
+ else {
+ m_imp->m_stack.push(
+ basic_directory_iterator<Path>( *m_imp->m_stack.top() )
+ );
+ }
+#else
         m_imp->m_stack.push(
           m_imp->m_no_throw
             ? basic_directory_iterator<Path>( *m_imp->m_stack.top(), ec )
             : basic_directory_iterator<Path>( *m_imp->m_stack.top() ) );
+#endif
         if ( m_imp->m_stack.top() != end_itr )
         {
           ++m_imp->m_level;

Modified: branches/release/boost/filesystem/operations.hpp
==============================================================================
--- branches/release/boost/filesystem/operations.hpp (original)
+++ branches/release/boost/filesystem/operations.hpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -121,10 +121,6 @@
 
     namespace detail
     {
- // singular object used only as a tag; thus initialization and
- // thread-safety are not issues
- BOOST_FILESYSTEM_DECL extern system::error_code throws;
-
       typedef std::pair< system::error_code, bool >
         query_pair;
 
@@ -234,7 +230,10 @@
 # endif
 
       template<class Path>
- unsigned long remove_all_aux( const Path & ph );
+ bool remove_aux( const Path & ph, file_status f );
+
+ template<class Path>
+ unsigned long remove_all_aux( const Path & ph, file_status f );
 
     } // namespace detail
 
@@ -474,19 +473,24 @@
       return ec;
     }
 
- BOOST_FS_FUNC(void) remove( const Path & ph, system::error_code & ec = detail::throws )
+ BOOST_FS_FUNC(bool) remove( const Path & ph )
     {
- system::error_code error( detail::remove_api(ph.external_file_string()) );
- if ( error && &ec == &detail::throws )
+ system::error_code ec;
+ file_status f = symlink_status( ph, ec );
+ if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
- "boost::filesystem::remove", ph, error ) );
- ec = error;
+ "boost::filesystem::remove", ph, ec ) );
+ return detail::remove_aux( ph, f );
     }
 
     BOOST_FS_FUNC(unsigned long) remove_all( const Path & ph )
     {
- return exists( ph )|| is_symlink( ph )
- ? detail::remove_all_aux( ph ) : 0;
+ system::error_code ec;
+ file_status f = symlink_status( ph, ec );
+ if ( ec )
+ boost::throw_exception( basic_filesystem_error<Path>(
+ "boost::filesystem::remove_all", ph, ec ) );
+ return exists( f ) ? detail::remove_all_aux( ph, f ) : 0;
     }
 
     BOOST_FS_FUNC(void) rename( const Path & from_path, const Path & to_path )
@@ -712,8 +716,10 @@
       const wpath & from_ph, system::error_code & ec )
       { return create_symlink<wpath>( to_ph, from_ph, ec ); }
 
- inline void remove( const path & ph ) { remove<path>( ph ); }
- inline void remove( const wpath & ph ) { remove<wpath>( ph ); }
+ inline bool remove( const path & ph )
+ { return remove<path>( ph ); }
+ inline bool remove( const wpath & ph )
+ { return remove<wpath>( ph ); }
 
     inline unsigned long remove_all( const path & ph )
       { return remove_all<path>( ph ); }
@@ -762,20 +768,39 @@
     namespace detail
     {
       template<class Path>
- unsigned long remove_all_aux( const Path & ph )
+ bool remove_aux( const Path & ph, file_status f )
+ {
+ if ( exists( f ) )
+ {
+ system::error_code ec = remove_api( ph.external_file_string() );
+ if ( ec )
+ boost::throw_exception( basic_filesystem_error<Path>(
+ "boost::filesystem::remove", ph, ec ) );
+ return true;
+ }
+ return false;
+ }
+
+ template<class Path>
+ unsigned long remove_all_aux( const Path & ph, file_status f )
       {
         static const boost::filesystem::basic_directory_iterator<Path> end_itr;
         unsigned long count = 1;
- if ( !boost::filesystem::is_symlink( ph ) // don't recurse symbolic links
- && boost::filesystem::is_directory( ph ) )
+ if ( !boost::filesystem::is_symlink( f ) // don't recurse symbolic links
+ && boost::filesystem::is_directory( f ) )
         {
           for ( boost::filesystem::basic_directory_iterator<Path> itr( ph );
                 itr != end_itr; ++itr )
           {
- count += remove_all_aux( itr->path() );
+ boost::system::error_code ec;
+ boost::filesystem::file_status fn = boost::filesystem::symlink_status( itr->path(), ec );
+ if ( ec )
+ boost::throw_exception( basic_filesystem_error<Path>(
+ "boost::filesystem:remove_all", ph, ec ) );
+ count += remove_all_aux( itr->path(), fn );
           }
         }
- boost::filesystem::remove( ph );
+ remove_aux( ph, f );
         return count;
       }
 
@@ -1020,12 +1045,18 @@
 
       void replace_filename( const string_type & s,
         file_status st, file_status symlink_st )
- {
- m_path.remove_filename();
- m_path /= s;
- m_status = st;
- m_symlink_status = symlink_st;
- }
+ {
+ m_path.remove_filename();
+ m_path /= s;
+ m_status = st;
+ m_symlink_status = symlink_st;
+ }
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ void replace_leaf( const string_type & s,
+ file_status st, file_status symlink_st )
+ { replace_filename( s, st, symlink_st ); }
+# endif
 
       const Path & path() const { return m_path; }
       file_status status() const;
@@ -1042,6 +1073,10 @@
       {
         return path().filename();
       }
+ typename Path::string_type leaf() const
+ {
+ return path().filename();
+ }
       typename Path::string_type string() const
       {
         return path().string();

Modified: branches/release/boost/filesystem/path.hpp
==============================================================================
--- branches/release/boost/filesystem/path.hpp (original)
+++ branches/release/boost/filesystem/path.hpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -227,8 +227,10 @@
       string_type extension() const;
 
 # ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- string_type leaf() const { return filename(); }
- basic_path branch_path() const { return parent_path(); }
+ string_type leaf() const { return filename(); }
+ basic_path branch_path() const { return parent_path(); }
+ bool has_leaf() const { return !m_path.empty(); }
+ bool has_branch_path() const { return !parent_path().empty(); }
 # endif
 
       bool empty() const { return m_path.empty(); } // name consistent with std containers
@@ -237,7 +239,7 @@
       bool has_root_name() const;
       bool has_root_directory() const;
       bool has_relative_path() const { return !relative_path().empty(); }
- bool has_filename() const { return !m_path.empty(); }
+ bool has_filename() const { return !m_path.empty(); }
       bool has_parent_path() const { return !parent_path().empty(); }
 
       // iterators
@@ -531,7 +533,7 @@
     // inserters and extractors --------------------------------------------//
 
 // bypass VC++ 7.0 and earlier, and broken Borland compilers
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__BORLANDC__, < 0x610)
     template< class Path >
     std::basic_ostream< typename Path::string_type::value_type,
       typename Path::string_type::traits_type > &
@@ -594,23 +596,23 @@
       // BOOST_FILESYSTEM_DECL version works for VC++ but not GCC. Go figure!
       inline
       const char * what( const char * sys_err_what,
- const path & path1, const path & path2, std::string & target )
+ const path & path1_arg, const path & path2_arg, std::string & target )
       {
         try
         {
           if ( target.empty() )
           {
             target = sys_err_what;
- if ( !path1.empty() )
+ if ( !path1_arg.empty() )
             {
               target += ": \"";
- target += path1.file_string();
+ target += path1_arg.file_string();
               target += "\"";
             }
- if ( !path2.empty() )
+ if ( !path2_arg.empty() )
             {
               target += ", \"";
- target += path2.file_string();
+ target += path2_arg.file_string();
               target += "\"";
             }
           }
@@ -624,7 +626,7 @@
 
       template<class Path>
       const char * what( const char * sys_err_what,
- const Path & /*path1*/, const Path & /*path2*/, std::string & /*target*/ )
+ const Path & /*path1_arg*/, const Path & /*path2_arg*/, std::string & /*target*/ )
       {
         return sys_err_what;
       }

Modified: branches/release/libs/filesystem/doc/index.htm
==============================================================================
--- branches/release/libs/filesystem/doc/index.htm (original)
+++ branches/release/libs/filesystem/doc/index.htm 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -44,6 +44,8 @@
     <a href="#Using_reference_doc">Using the Reference Documentation</a><br>
     <a href="#Examples">Example programs</a><br>
     <a href="#Implementation">Implementation</a><br>
+ Macros<br>
+ Deprecated names and features<br>
     <a href="#narrow-only">Using only narrow character paths</a><br>
     <a href="#Building">Building the object-library</a><br>
     &nbsp;&nbsp;&nbsp;&nbsp;Notes for Cygwin users<br>
@@ -309,6 +311,211 @@
 <p>The library is in regular use on Apple OS X, HP-UX, IBM AIX, Linux,
 Microsoft Windows, SGI IRIX, and Sun Solaris operating systems using a variety
 of compilers.</p>
+<h2><a name="Macros">Macros</a></h2>
+<p>Users may defined the following macros if desired. Sensible defaults are
+provided, so users can ignore these macros unless they have special needs.</p>
+<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
+ <tr>
+ <td><b><i>Macro Name</i></b></td>
+ <td><b><i>Default</i></b></td>
+ <td><b><i>Effect if defined</i></b></td>
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_WINDOWS_API</code></td>
+ <td valign="top">Defined if Windows is detected by Boost.System's automatic configuration
+ code, otherwise not defined.</td>
+ <td valign="top">Implementation uses the Microsoft Windows native
+ application program interface (API).</td>
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_POSIX_API</code></td>
+ <td valign="top">Defined if Windows is not detected by Boost.System's automatic configuration
+ code.</td>
+ <td valign="top">Implementation uses the POSIX native
+ application program interface (API).</td>
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_FILESYSTEM_DYN_LINK</code></td>
+ <td valign="top">Defined if <code>BOOST_ALL_DYN_LINK</code> is defined,
+ otherwise not defined.</td>
+ <td valign="top">Boost.System library is dynamically linked. If not defined,
+ static linking is assumed.</td>
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_FILESYSTEM_NO_LIB</code></td>
+ <td valign="top">Defined if <code>BOOST_ALL_NO_LIB</code> is defined,
+ otherwise not defined.</td>
+ <td valign="top">Boost.System library does not use the Boost auto-link
+ facility.</td>
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_FILESYSTEM_NARROW_ONLY</code></td>
+ <td valign="top">Not defined.</td>
+ <td valign="top">Removes features that require wchar_t support.</td>
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_FILESYSTEM_NO_DEPRECATED</code></td>
+ <td valign="top">Not defined.</td>
+ <td valign="top">Deprecated features are excluded.</td>
+ </tr>
+</table>
+<h2><a name="Deprecated-names">Deprecated names</a> and features</h2>
+<p style="font-size: 10pt">As the library evolves over time, names sometimes
+change or features are removed. To ease transition, Boost.Filesystem deprecates
+the old names and features, but continues to provide them unless macro <code>
+BOOST_FILESYSTEM_NO_DEPRECATED</code> is defined.</p>
+<table border="1" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
+ <tr>
+ <td style="font-size: 10pt">
+ <b><i>Component</i></b></td>
+ <td style="font-size: 10pt">
+ <p style="font-size: 10pt"><b><i>Old name, now deprecated</i></b></td>
+ <td style="font-size: 10pt">
+ <p style="font-size: 10pt"><b><i>New name</i></b></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top"><code>basic_path</code></td>
+ <td style="font-size: 10pt"><code>leaf()</code></td>
+ <td style="font-size: 10pt"><code>filename()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top"><code>basic_path</code></td>
+ <td style="font-size: 10pt"><code>branch_path()</code></td>
+ <td style="font-size: 10pt"><code>parent_path()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top"><code>basic_path</code></td>
+ <td style="font-size: 10pt"><code>has_leaf()</code></td>
+ <td style="font-size: 10pt"><code>has_filename()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top"><code>basic_path</code></td>
+ <td style="font-size: 10pt"><code>has_branch_path()</code></td>
+ <td style="font-size: 10pt"><code>has_parent_path()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <p style="font-size: 10pt"><code>remove_leaf()</code></td>
+ <td style="font-size: 10pt">
+ <p style="font-size: 10pt"><code>remove_filename()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>basic_path( const string_type &amp; str,<br>
+&nbsp; name_check )</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>basic_path( const string_type::value_type * s,<br>
+&nbsp; name_check )</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>native_file_string()</code></td>
+ <td style="font-size: 10pt">
+ <code>file_string()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>native_directory_string()</code></td>
+ <td style="font-size: 10pt">
+ <code>directory_string()</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>default_name_check_writable()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>default_name_check( name_check )</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>default_name_check()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>canonize()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_path</code></td>
+ <td style="font-size: 10pt">
+ <code>normalize()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>operations.hpp</code></td>
+ <td style="font-size: 10pt">
+ <code>is_regular( file_status f )</code></td>
+ <td style="font-size: 10pt">
+ <code>is_regular_file( file_status f )</code></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>operations.hpp</code></td>
+ <td style="font-size: 10pt">
+ <code>symbolic_link_exists( const path &amp; ph )</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_directory_status</code></td>
+ <td style="font-size: 10pt">
+ <code>filename()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed, use path().filename() instead</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_directory_status</code></td>
+ <td style="font-size: 10pt">
+ <code>leaf()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed, use path().filename() instead</code></i></td>
+ </tr>
+ <tr>
+ <td style="font-size: 10pt" valign="top">
+ <code>basic_directory_status</code></td>
+ <td style="font-size: 10pt">
+ <code>string()</code></td>
+ <td style="font-size: 10pt">
+ <i><code>feature removed, use path().string() instead</code></i></td>
+ </tr>
+</table>
 <h2><a name="narrow-only">Restricting library to narrow character paths</a></h2>
 <p>Compilers or standard libraries which do not support wide characters (wchar_t)
 or wide character strings (std::wstring) are detected automatically, and cause
@@ -553,13 +760,13 @@
 
 <hr>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->18 March, 2008<!--webbot bot="Timestamp" endspan i-checksum="29005" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 October, 2008<!--webbot bot="Timestamp" endspan i-checksum="39192" --></p>
 
-<p>© Copyright Beman Dawes, 2002-2005</p>
+<p>&copy; Copyright Beman Dawes, 2002-2005</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">
 www.boost.org/LICENSE_1_0.txt</a></p>
 
 </body>
 
-</html>
+</html>
\ No newline at end of file

Modified: branches/release/libs/filesystem/doc/reference.html
==============================================================================
--- branches/release/libs/filesystem/doc/reference.html (original)
+++ branches/release/libs/filesystem/doc/reference.html 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -129,6 +129,10 @@
   </tr>
 </table>
 
+<p><i>Some functions have been renamed or deprecated since earlier releases of
+the library. See <a href="index.htm#Deprecated-names">Deprecated names and
+features</a>.</i></p>
+
 <h2><a name="Introduction">Introduction</a></h2>
 <p>Some library behavior is specified by reference to ISO/IEC 9945:2003, <i>
 <a href="http://www.unix.org/single_unix_specification/">POSIX</a></i>. How such behavior is actually implemented is unspecified.</p>
@@ -3072,7 +3076,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 -->06 July 2008<!--webbot bot="Timestamp" endspan i-checksum="18830" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->13 October 2008<!--webbot bot="Timestamp" endspan i-checksum="32600" --></p>
 
 </body>
 

Modified: branches/release/libs/filesystem/example/mbcopy.cpp
==============================================================================
--- branches/release/libs/filesystem/example/mbcopy.cpp (original)
+++ branches/release/libs/filesystem/example/mbcopy.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -9,6 +9,9 @@
 // Copy the files in a directory, using mbpath to represent the new file names
 // See http://../doc/path.htm#mbpath for more information
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/config.hpp>
 # ifdef BOOST_FILESYSTEM_NARROW_ONLY
 # error This compiler or standard library does not support wide-character strings or paths
@@ -74,7 +77,7 @@
   {
     if ( fs::is_regular_file(it->status()) )
     {
- copy_file( *it, target_dir / it->filename() );
+ copy_file( *it, target_dir / it->path().filename() );
     }
   }
 

Modified: branches/release/libs/filesystem/example/mbpath.cpp
==============================================================================
--- branches/release/libs/filesystem/example/mbpath.cpp (original)
+++ branches/release/libs/filesystem/example/mbpath.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -1,4 +1,4 @@
-// Boost.Filesystem mbpath.hpp ---------------------------------------------//
+// Boost.Filesystem mbpath.cpp ---------------------------------------------//
 
 // (c) Copyright Beman Dawes 2005
 

Modified: branches/release/libs/filesystem/example/mbpath.hpp
==============================================================================
--- branches/release/libs/filesystem/example/mbpath.hpp (original)
+++ branches/release/libs/filesystem/example/mbpath.hpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -10,6 +10,7 @@
 // See http://../doc/path.htm#mbpath for more information
 
 #include <boost/filesystem/path.hpp>
+#include <cwchar> // for std::mbstate_t
 #include <string>
 #include <locale>
 

Modified: branches/release/libs/filesystem/example/simple_ls.cpp
==============================================================================
--- branches/release/libs/filesystem/example/simple_ls.cpp (original)
+++ branches/release/libs/filesystem/example/simple_ls.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -8,6 +8,9 @@
 
 // See http://www.boost.org/libs/filesystem for documentation.
 
+// As an example program, we don't want to use any deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include "boost/filesystem/operations.hpp"
 #include "boost/filesystem/path.hpp"
 #include "boost/progress.hpp"
@@ -22,7 +25,7 @@
   fs::path full_path( fs::initial_path<fs::path>() );
 
   if ( argc > 1 )
- full_path = fs::system_complete( fs::path( argv[1], fs::native ) );
+ full_path = fs::system_complete( fs::path( argv[1] ) );
   else
     std::cout << "\nusage: simple_ls [path]" << std::endl;
 
@@ -33,14 +36,14 @@
 
   if ( !fs::exists( full_path ) )
   {
- std::cout << "\nNot found: " << full_path.native_file_string() << std::endl;
+ std::cout << "\nNot found: " << full_path.file_string() << std::endl;
     return 1;
   }
 
   if ( fs::is_directory( full_path ) )
   {
     std::cout << "\nIn directory: "
- << full_path.native_directory_string() << "\n\n";
+ << full_path.directory_string() << "\n\n";
     fs::directory_iterator end_iter;
     for ( fs::directory_iterator dir_itr( full_path );
           dir_itr != end_iter;
@@ -51,24 +54,24 @@
         if ( fs::is_directory( dir_itr->status() ) )
         {
           ++dir_count;
- std::cout << dir_itr->filename() << " [directory]\n";
+ std::cout << dir_itr->path().filename() << " [directory]\n";
         }
         else if ( fs::is_regular_file( dir_itr->status() ) )
         {
           ++file_count;
- std::cout << dir_itr->filename() << "\n";
+ std::cout << dir_itr->path().filename() << "\n";
         }
         else
         {
           ++other_count;
- std::cout << dir_itr->filename() << " [other]\n";
+ std::cout << dir_itr->path().filename() << " [other]\n";
         }
 
       }
       catch ( const std::exception & ex )
       {
         ++err_count;
- std::cout << dir_itr->filename() << " " << ex.what() << std::endl;
+ std::cout << dir_itr->path().filename() << " " << ex.what() << std::endl;
       }
     }
     std::cout << "\n" << file_count << " files\n"
@@ -78,7 +81,7 @@
   }
   else // must be a file
   {
- std::cout << "\nFound: " << full_path.native_file_string() << "\n";
+ std::cout << "\nFound: " << full_path.file_string() << "\n";
   }
   return 0;
 }

Modified: branches/release/libs/filesystem/src/operations.cpp
==============================================================================
--- branches/release/libs/filesystem/src/operations.cpp (original)
+++ branches/release/libs/filesystem/src/operations.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -112,9 +112,9 @@
 {
   const error_code ok;
 
- const fs::directory_iterator end_itr;
   bool is_empty_directory( const std::string & dir_path )
   {
+ static const fs::directory_iterator end_itr;
     return fs::directory_iterator(fs::path(dir_path)) == end_itr;
   }
 
@@ -133,9 +133,9 @@
   inline DWORD get_file_attributes( const wchar_t * ph )
     { return ::GetFileAttributesW( ph ); }
 
- const fs::wdirectory_iterator wend_itr;
   bool is_empty_directory( const std::wstring & dir_path )
   {
+ static const fs::wdirectory_iterator wend_itr;
     return fs::wdirectory_iterator(fs::wpath(dir_path)) == wend_itr;
   }
 
@@ -585,7 +585,7 @@
         int err = ::unlink( p );
         if ( err != EPERM )
           return err;
- return ::rmdir( p )
+ return ::rmdir( p );
 # else
         return std::remove( p );
 # endif

Modified: branches/release/libs/filesystem/test/Jamfile.v2
==============================================================================
--- branches/release/libs/filesystem/test/Jamfile.v2 (original)
+++ branches/release/libs/filesystem/test/Jamfile.v2 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -7,44 +7,36 @@
 project
     : requirements
       <library>/boost/filesystem//boost_filesystem
- <define>BOOST_ALL_NO_LIB
       <toolset>msvc:<asynch-exceptions>on
     ;
 
    test-suite "filesystem" :
        [ run path_test.cpp
- : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <link>static
+ : : : <link>static
        ]
        [ run path_test.cpp ../../system/build
- : : : <define>BOOST_FILESYSTEM_DYN_LINK <define>BOOST_SYSTEM_DYN_LINK
- : path_test_dll
+ : : : : path_test_dll
        ]
        [ run operations_test.cpp
- : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <link>static
+ : : : <link>static
        ]
        [ run operations_test.cpp ../../system/build
- : : : <define>BOOST_FILESYSTEM_DYN_LINK <define>BOOST_SYSTEM_DYN_LINK
- : operations_test_dll
+ : : : : operations_test_dll
        ]
        [ run fstream_test.cpp
- : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <link>static
+ : : : <link>static
        ]
        [ run convenience_test.cpp
- : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <link>static
+ : : : <link>static
        ]
        [ run large_file_support_test.cpp
- : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <link>static
+ : : : <link>static
        ]
        [ run wide_test.cpp
- : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <link>static
+ : : : <link>static
        ]
 
+ [ compile deprecated_test.cpp ]
        [ compile ../example/mbcopy.cpp ]
        [ compile ../example/mbpath.cpp ]
        [ compile ../example/simple_ls.cpp ]

Modified: branches/release/libs/filesystem/test/convenience_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/convenience_test.cpp (original)
+++ branches/release/libs/filesystem/test/convenience_test.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -10,6 +10,9 @@
 
 #include <boost/config/warning_disable.hpp>
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/convenience.hpp>
 namespace fs = boost::filesystem;
 using fs::path;
@@ -52,8 +55,6 @@
 
 int test_main( int, char*[] )
 {
- path::default_name_check( fs::no_check ); // names below not valid on all O/S's
- // but they must be tested anyhow
 
 // create_directories() tests ----------------------------------------------//
 
@@ -77,41 +78,13 @@
 
   path is_a_file( "xx/uu" );
   {
- std::ofstream f( is_a_file.native_file_string().c_str() );
+ std::ofstream f( is_a_file.external_file_string().c_str() );
     BOOST_CHECK( !!f );
   }
   BOOST_CHECK( throws_fs_error(
     boost::bind( BOOST_BND(fs::create_directories), is_a_file ) ) );
   BOOST_CHECK( throws_fs_error(
     boost::bind( BOOST_BND(fs::create_directories), is_a_file / "aa" ) ) );
-
-// extension() tests ---------------------------------------------------------//
-
- BOOST_CHECK( fs::extension("a/b") == "" );
- BOOST_CHECK( fs::extension("a/b.txt") == ".txt" );
- BOOST_CHECK( fs::extension("a/b.") == "." );
- BOOST_CHECK( fs::extension("a.b.c") == ".c" );
- BOOST_CHECK( fs::extension("a.b.c.") == "." );
- BOOST_CHECK( fs::extension("") == "" );
- BOOST_CHECK( fs::extension("a/") == "." );
-
-// basename() tests ----------------------------------------------------------//
-
- BOOST_CHECK( fs::basename("b") == "b" );
- BOOST_CHECK( fs::basename("a/b.txt") == "b" );
- BOOST_CHECK( fs::basename("a/b.") == "b" );
- BOOST_CHECK( fs::basename("a.b.c") == "a.b" );
- BOOST_CHECK( fs::basename("a.b.c.") == "a.b.c" );
- BOOST_CHECK( fs::basename("") == "" );
-
-// change_extension tests ---------------------------------------------------//
-
- BOOST_CHECK( fs::change_extension("a.txt", ".tex").string() == "a.tex" );
- BOOST_CHECK( fs::change_extension("a.", ".tex").string() == "a.tex" );
- BOOST_CHECK( fs::change_extension("a", ".txt").string() == "a.txt" );
- BOOST_CHECK( fs::change_extension("a.b.txt", ".tex").string() == "a.b.tex" );
- // see the rationale in html docs for explanation why this works
- BOOST_CHECK( fs::change_extension("", ".png").string() == ".png" );
 
 // recursive_directory_iterator tests ----------------------------------------//
 
@@ -133,7 +106,7 @@
 
   for ( it = fs::recursive_directory_iterator( "xx" );
         it != fs::recursive_directory_iterator(); ++it )
- { std::cout << *it << '\n'; }
+ { std::cout << it->path() << '\n'; }
 
   it = fs::recursive_directory_iterator( "xx" );
   BOOST_CHECK( it->path() == "xx/yy" );

Modified: branches/release/libs/filesystem/test/fstream_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/fstream_test.cpp (original)
+++ branches/release/libs/filesystem/test/fstream_test.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -9,6 +9,9 @@
 
 #include <boost/config/warning_disable.hpp>
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/fstream.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <string>

Modified: branches/release/libs/filesystem/test/large_file_support_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/large_file_support_test.cpp (original)
+++ branches/release/libs/filesystem/test/large_file_support_test.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -8,6 +8,9 @@
 // See library home page at http://www.boost.org/libs/filesystem
 
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/operations.hpp>
 namespace fs = boost::filesystem;
 

Modified: branches/release/libs/filesystem/test/lpath.hpp
==============================================================================
--- branches/release/libs/filesystem/test/lpath.hpp (original)
+++ branches/release/libs/filesystem/test/lpath.hpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -9,6 +9,7 @@
 // See library home page at http://www.boost.org/libs/filesystem
 
 #include <boost/filesystem/path.hpp>
+#include <cwchar> // for std::mbstate_t
 #include <string>
 #include <ios> // for std::streamoff
 

Modified: branches/release/libs/filesystem/test/msvc/boost_filesystem.sln
==============================================================================
--- branches/release/libs/filesystem/test/msvc/boost_filesystem.sln (original)
+++ branches/release/libs/filesystem/test/msvc/boost_filesystem.sln 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -56,6 +56,12 @@
                 {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
         EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "deprecated_test", "deprecated_test\deprecated_test.vcproj", "{EA1530CD-7058-4912-8B51-8D55A07F0A1D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -102,6 +108,10 @@
                 {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Debug|Win32.Build.0 = Debug|Win32
                 {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Release|Win32.ActiveCfg = Release|Win32
                 {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Release|Win32.Build.0 = Release|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Debug|Win32.Build.0 = Debug|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Release|Win32.ActiveCfg = Release|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: branches/release/libs/filesystem/test/msvc/convenience_test/convenience_test.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/convenience_test/convenience_test.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/convenience_test/convenience_test.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,7 +86,7 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description="Auto test run"
+ Description="Executing test $(TargetName).exe..."
                                 CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
@@ -163,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/fstream_test/fstream_test.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/fstream_test/fstream_test.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/fstream_test/fstream_test.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,7 +86,7 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description="Auto test run"
+ Description="Executing test $(TargetName).exe..."
                                 CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
@@ -163,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/large_file_support_test/large_file_support_test.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/large_file_support_test/large_file_support_test.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/large_file_support_test/large_file_support_test.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,7 +86,7 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description="Auto test run"
+ Description="Executing test $(TargetName).exe..."
                                 CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
@@ -163,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,6 +86,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description=""
+ CommandLine=""
                         />
                 </Configuration>
                 <Configuration
@@ -161,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description=""
+ CommandLine=""
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/operations_test/operations_test.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/operations_test/operations_test.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/operations_test/operations_test.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,7 +86,7 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description="Auto test run"
+ Description="Executing test $(TargetName).exe..."
                                 CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
@@ -163,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/path_test/path_test.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/path_test/path_test.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/path_test/path_test.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,7 +86,7 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description="Auto test run"
+ Description="Executing test $(TargetName).exe..."
                                 CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
@@ -163,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/simple_ls/simple_ls.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/simple_ls/simple_ls.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/simple_ls/simple_ls.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,6 +86,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description=""
+ CommandLine=""
                         />
                 </Configuration>
                 <Configuration
@@ -161,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description=""
+ CommandLine=""
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/msvc/wide_test/wide_test.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/wide_test/wide_test.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/wide_test/wide_test.vcproj 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -86,7 +86,7 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description="Auto test run"
+ Description="Executing test $(TargetName).exe..."
                                 CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
@@ -163,6 +163,8 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
                         />
                 </Configuration>
         </Configurations>

Modified: branches/release/libs/filesystem/test/operations_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/operations_test.cpp (original)
+++ branches/release/libs/filesystem/test/operations_test.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -9,6 +9,9 @@
 
 #include <boost/config/warning_disable.hpp>
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/convenience.hpp>
 #include <boost/cerrno.hpp>
@@ -25,6 +28,7 @@
 #include <fstream>
 #include <iostream>
 #include <string>
+#include <cstring> // for strncmp, etc.
 #include <ctime>
 #include <cstdlib> // for system()
 
@@ -143,8 +147,11 @@
       exception_thrown = true;
       if ( report_throws ) std::cout << x.what() << std::endl;
       if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
- BOOST_CHECK( std::strcmp( x.what(),
- "boost::filesystem::create_directory" ) == 0 );
+ // the stdcxx standard library apparently appends additional info
+ // to what(), so check only the initial portion:
+ BOOST_CHECK( std::strncmp( x.what(),
+ "boost::filesystem::create_directory",
+ sizeof("boost::filesystem::create_directory")-1 ) == 0 );
     }
     BOOST_CHECK( exception_thrown );
 
@@ -215,7 +222,7 @@
   
   void bad_directory_size()
   {
- fs::file_size( fs::current_path() );
+ fs::file_size( fs::current_path<fs::path>() );
   }
   
   fs::path bad_create_directory_path;
@@ -301,7 +308,6 @@
   BOOST_CHECK( !fs::exists( ng ) );
   BOOST_CHECK( !fs::is_directory( ng ) );
   BOOST_CHECK( !fs::is_regular_file( ng ) );
- BOOST_CHECK( !fs::is_regular( ng ) ); // verify deprecated name still works
   BOOST_CHECK( !fs::is_symlink( ng ) );
   fs::file_status stat( fs::status( ng ) );
   BOOST_CHECK( fs::status_known( stat ) );
@@ -438,9 +444,6 @@
   BOOST_CHECK( !fs::is_symlink( dir ) );
   BOOST_CHECK( !fs::is_symlink( "nosuchfileordirectory" ) );
 
- BOOST_CHECK( !fs::symbolic_link_exists( dir ) );
- BOOST_CHECK( !fs::symbolic_link_exists( "nosuchfileordirectory" ) );
-
   fs::path d1( dir / "d1" );
   BOOST_CHECK( fs::create_directory( d1 ) );
   BOOST_CHECK( fs::exists( d1 ) );
@@ -477,7 +480,7 @@
     BOOST_CHECK( fs::is_directory( dir_itr->status() ) );
     BOOST_CHECK( fs::is_directory( fs::symlink_status(*dir_itr) ) );
     BOOST_CHECK( fs::is_directory( dir_itr->symlink_status() ) );
- BOOST_CHECK( dir_itr->filename() == "d1" );
+ BOOST_CHECK( dir_itr->path().filename() == "d1" );
   }
 
   // create a second directory named d2
@@ -497,21 +500,21 @@
     BOOST_CHECK( !fs::is_symlink(dir_itr->status()) );
 
     fs::directory_iterator dir_itr2( dir );
- BOOST_CHECK( dir_itr->filename() == "d1"
- || dir_itr->filename() == "d2" );
- BOOST_CHECK( dir_itr2->filename() == "d1" || dir_itr2->filename() == "d2" );
- if ( dir_itr->filename() == "d1" )
- {
- BOOST_CHECK( (++dir_itr)->filename() == "d2" );
- BOOST_CHECK( dir_itr2->filename() == "d1" );
- BOOST_CHECK( (++dir_itr2)->filename() == "d2" );
+ BOOST_CHECK( dir_itr->path().filename() == "d1"
+ || dir_itr->path().filename() == "d2" );
+ BOOST_CHECK( dir_itr2->path().filename() == "d1" || dir_itr2->path().filename() == "d2" );
+ if ( dir_itr->path().filename() == "d1" )
+ {
+ BOOST_CHECK( (++dir_itr)->path().filename() == "d2" );
+ BOOST_CHECK( dir_itr2->path().filename() == "d1" );
+ BOOST_CHECK( (++dir_itr2)->path().filename() == "d2" );
     }
     else
     {
- BOOST_CHECK( dir_itr->filename() == "d2" );
- BOOST_CHECK( (++dir_itr)->filename() == "d1" );
- BOOST_CHECK( (dir_itr2)->filename() == "d2" );
- BOOST_CHECK( (++dir_itr2)->filename() == "d1" );
+ BOOST_CHECK( dir_itr->path().filename() == "d2" );
+ BOOST_CHECK( (++dir_itr)->path().filename() == "d1" );
+ BOOST_CHECK( (dir_itr2)->path().filename() == "d2" );
+ BOOST_CHECK( (++dir_itr2)->path().filename() == "d1" );
     }
     BOOST_CHECK( ++dir_itr == fs::directory_iterator() );
     BOOST_CHECK( dir_itr2 != fs::directory_iterator() );
@@ -520,21 +523,21 @@
 
   { // *i++ must work to meet the standard's InputIterator requirements
     fs::directory_iterator dir_itr( dir );
- BOOST_CHECK( dir_itr->filename() == "d1"
- || dir_itr->filename() == "d2" );
- if ( dir_itr->filename() == "d1" )
+ BOOST_CHECK( dir_itr->path().filename() == "d1"
+ || dir_itr->path().filename() == "d2" );
+ if ( dir_itr->path().filename() == "d1" )
     {
- BOOST_CHECK( (*dir_itr++).filename() == "d1" );
- BOOST_CHECK( dir_itr->filename() == "d2" );
+ BOOST_CHECK( (*dir_itr++).path().filename() == "d1" );
+ BOOST_CHECK( dir_itr->path().filename() == "d2" );
     }
     else
     {
       // Check C++98 input iterator requirements
- BOOST_CHECK( (*dir_itr++).filename() == "d2" );
+ BOOST_CHECK( (*dir_itr++).path().filename() == "d2" );
       // input iterator requirements in the current WP would require this check:
       // BOOST_CHECK( implicit_cast<std::string const&>(*dir_itr++).filename() == "d1" );
 
- BOOST_CHECK( dir_itr->filename() == "d1" );
+ BOOST_CHECK( dir_itr->path().filename() == "d1" );
     }
 
     // test case reported in comment to SourceForge bug tracker [937606]
@@ -559,7 +562,7 @@
     bool found(false);
     do
     {
- if ( it->filename() == temp_dir_name ) found = true;
+ if ( it->path().filename() == temp_dir_name ) found = true;
     } while ( ++it != fs::directory_iterator() );
     BOOST_CHECK( found );
   }
@@ -776,10 +779,10 @@
   create_file( file_ph, "" );
   BOOST_CHECK( fs::exists( file_ph ) );
   BOOST_CHECK( !fs::is_directory( file_ph ) );
- fs::remove( file_ph );
+ BOOST_CHECK( fs::remove( file_ph ) );
   BOOST_CHECK( !fs::exists( file_ph ) );
- fs::remove( "no-such-file" );
- fs::remove( "no-such-directory/no-such-file" );
+ BOOST_CHECK( !fs::remove( "no-such-file" ) );
+ BOOST_CHECK( !fs::remove( "no-such-directory/no-such-file" ) );
 
   // remove() directory
   d1 = dir / "shortlife_dir";
@@ -790,50 +793,50 @@
   BOOST_CHECK( BOOST_FS_IS_EMPTY( d1 ) );
   bad_remove_dir = dir;
   BOOST_CHECK( CHECK_EXCEPTION( bad_remove, ENOTEMPTY ) );
- fs::remove( d1 );
+ BOOST_CHECK( fs::remove( d1 ) );
   BOOST_CHECK( !fs::exists( d1 ) );
 
   if ( create_symlink_ok ) // only if symlinks supported
   {
     // remove() dangling symbolic link
     fs::path link( "dangling_link" );
- fs::remove( link );
+ fs::remove( link ); // remove any residue from past tests
     BOOST_CHECK( !fs::is_symlink( link ) );
     BOOST_CHECK( !fs::exists( link ) );
     fs::create_symlink( "nowhere", link );
     BOOST_CHECK( !fs::exists( link ) );
     BOOST_CHECK( fs::is_symlink( link ) );
- fs::remove( link );
+ BOOST_CHECK( fs::remove( link ) );
     BOOST_CHECK( !fs::is_symlink( link ) );
 
     // remove() self-refering symbolic link
     link = "link_to_self";
- fs::remove( link );
+ fs::remove( link ); // remove any residue from past tests
     BOOST_CHECK( !fs::is_symlink( link ) );
     BOOST_CHECK( !fs::exists( link ) );
     fs::create_symlink( link, link );
- fs::remove( link );
+ BOOST_CHECK( fs::remove( link ) );
     BOOST_CHECK( !fs::exists( link ) );
     BOOST_CHECK( !fs::is_symlink( link ) );
 
     // remove() cyclic symbolic link
     link = "link_to_a";
     fs::path link2( "link_to_b" );
- fs::remove( link );
- fs::remove( link2 );
+ fs::remove( link ); // remove any residue from past tests
+ fs::remove( link2 ); // remove any residue from past tests
     BOOST_CHECK( !fs::is_symlink( link ) );
     BOOST_CHECK( !fs::exists( link ) );
     fs::create_symlink( link, link2 );
     fs::create_symlink( link2, link );
- fs::remove( link );
- fs::remove( link2 );
+ BOOST_CHECK( fs::remove( link ) );
+ BOOST_CHECK( fs::remove( link2 ) );
     BOOST_CHECK( !fs::exists( link ) );
     BOOST_CHECK( !fs::exists( link2 ) );
     BOOST_CHECK( !fs::is_symlink( link ) );
 
     // remove() symbolic link to file
     file_ph = "link_target";
- fs::remove( file_ph );
+ fs::remove( file_ph ); // remove any residue from past tests
     BOOST_CHECK( !fs::exists( file_ph ) );
     create_file( file_ph, "" );
     BOOST_CHECK( fs::exists( file_ph ) );
@@ -845,11 +848,11 @@
     BOOST_CHECK( !fs::is_directory( link ) );
     BOOST_CHECK( fs::is_regular_file( link ) );
     BOOST_CHECK( fs::is_symlink( link ) );
- fs::remove( link );
+ BOOST_CHECK( fs::remove( link ) );
     BOOST_CHECK( fs::exists( file_ph ) );
     BOOST_CHECK( !fs::exists( link ) );
     BOOST_CHECK( !fs::is_symlink( link ) );
- fs::remove( file_ph );
+ BOOST_CHECK( fs::remove( file_ph ) );
     BOOST_CHECK( !fs::exists( file_ph ) );
   }
 

Modified: branches/release/libs/filesystem/test/path_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/path_test.cpp (original)
+++ branches/release/libs/filesystem/test/path_test.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -13,6 +13,9 @@
 // on basename(), extension(), and change_extension() tests from the original
 // convenience_test.cpp by Vladimir Prus.
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/operations.hpp>
 #include <boost/utility.hpp>
 #include <iostream>
@@ -36,10 +39,10 @@
 
 namespace
 {
- int errors;
-
   std::string platform( BOOST_PLATFORM );
 
+ int errors;
+
   void check( const fs::path & source,
               const std::string & expected, int line )
   {
@@ -77,111 +80,6 @@
               << "\"" << std::endl;
   }
 
- void check_normalize()
- {
- PATH_CHECK( path("").normalize(), "" );
- PATH_CHECK( path("/").normalize(), "/" );
- PATH_CHECK( path("//").normalize(), "//" );
- PATH_CHECK( path("///").normalize(), "/" );
- PATH_CHECK( path("f").normalize(), "f" );
- PATH_CHECK( path("foo").normalize(), "foo" );
- PATH_CHECK( path("foo/").normalize(), "foo/." );
- PATH_CHECK( path("f/").normalize(), "f/." );
- PATH_CHECK( path( "/foo" ).normalize(), "/foo" );
- PATH_CHECK( path( "foo/bar" ).normalize(), "foo/bar" );
- PATH_CHECK( path("..").normalize(), ".." );
- PATH_CHECK( path("../..").normalize(), "../.." );
- PATH_CHECK( path("/..").normalize(), "/.." );
- PATH_CHECK( path("/../..").normalize(), "/../.." );
- PATH_CHECK( path("../foo").normalize(), "../foo" );
- PATH_CHECK( path("foo/..").normalize(), "." );
- PATH_CHECK( path("foo/../").normalize(), "./." );
- PATH_CHECK( (path("foo") / "..").normalize() , "." );
- PATH_CHECK( path("foo/...").normalize(), "foo/..." );
- PATH_CHECK( path("foo/.../").normalize(), "foo/.../." );
- PATH_CHECK( path("foo/..bar").normalize(), "foo/..bar" );
- PATH_CHECK( path("../f").normalize(), "../f" );
- PATH_CHECK( path("/../f").normalize(), "/../f" );
- PATH_CHECK( path("f/..").normalize(), "." );
- PATH_CHECK( (path("f") / "..").normalize() , "." );
- PATH_CHECK( path("foo/../..").normalize(), ".." );
- PATH_CHECK( path("foo/../../").normalize(), "../." );
- PATH_CHECK( path("foo/../../..").normalize(), "../.." );
- PATH_CHECK( path("foo/../../../").normalize(), "../../." );
- PATH_CHECK( path("foo/../bar").normalize(), "bar" );
- PATH_CHECK( path("foo/../bar/").normalize(), "bar/." );
- PATH_CHECK( path("foo/bar/..").normalize(), "foo" );
- PATH_CHECK( path("foo/bar/../").normalize(), "foo/." );
- PATH_CHECK( path("foo/bar/../..").normalize(), "." );
- PATH_CHECK( path("foo/bar/../../").normalize(), "./." );
- PATH_CHECK( path("foo/bar/../blah").normalize(), "foo/blah" );
- PATH_CHECK( path("f/../b").normalize(), "b" );
- PATH_CHECK( path("f/b/..").normalize(), "f" );
- PATH_CHECK( path("f/b/../").normalize(), "f/." );
- PATH_CHECK( path("f/b/../a").normalize(), "f/a" );
- PATH_CHECK( path("foo/bar/blah/../..").normalize(), "foo" );
- PATH_CHECK( path("foo/bar/blah/../../bletch").normalize(), "foo/bletch" );
- PATH_CHECK( path( "//net" ).normalize(), "//net" );
- PATH_CHECK( path( "//net/" ).normalize(), "//net/" );
- PATH_CHECK( path( "//..net" ).normalize(), "//..net" );
- PATH_CHECK( path( "//net/.." ).normalize(), "//net/.." );
- PATH_CHECK( path( "//net/foo" ).normalize(), "//net/foo" );
- PATH_CHECK( path( "//net/foo/" ).normalize(), "//net/foo/." );
- PATH_CHECK( path( "//net/foo/.." ).normalize(), "//net/" );
- PATH_CHECK( path( "//net/foo/../" ).normalize(), "//net/." );
-
- PATH_CHECK( path( "/net/foo/bar" ).normalize(), "/net/foo/bar" );
- PATH_CHECK( path( "/net/foo/bar/" ).normalize(), "/net/foo/bar/." );
- PATH_CHECK( path( "/net/foo/.." ).normalize(), "/net" );
- PATH_CHECK( path( "/net/foo/../" ).normalize(), "/net/." );
-
- PATH_CHECK( path( "//net//foo//bar" ).normalize(), "//net/foo/bar" );
- PATH_CHECK( path( "//net//foo//bar//" ).normalize(), "//net/foo/bar/." );
- PATH_CHECK( path( "//net//foo//.." ).normalize(), "//net/" );
- PATH_CHECK( path( "//net//foo//..//" ).normalize(), "//net/." );
-
- PATH_CHECK( path( "///net///foo///bar" ).normalize(), "/net/foo/bar" );
- PATH_CHECK( path( "///net///foo///bar///" ).normalize(), "/net/foo/bar/." );
- PATH_CHECK( path( "///net///foo///.." ).normalize(), "/net" );
- PATH_CHECK( path( "///net///foo///..///" ).normalize(), "/net/." );
-
- if ( platform == "Windows" )
- {
- PATH_CHECK( path( "c:.." ).normalize(), "c:.." );
- PATH_CHECK( path( "c:foo/.." ).normalize(), "c:" );
-
- PATH_CHECK( path( "c:foo/../" ).normalize(), "c:." );
-
- PATH_CHECK( path( "c:/foo/.." ).normalize(), "c:/" );
- PATH_CHECK( path( "c:/foo/../" ).normalize(), "c:/." );
- PATH_CHECK( path( "c:/.." ).normalize(), "c:/.." );
- PATH_CHECK( path( "c:/../" ).normalize(), "c:/../." );
- PATH_CHECK( path( "c:/../.." ).normalize(), "c:/../.." );
- PATH_CHECK( path( "c:/../../" ).normalize(), "c:/../../." );
- PATH_CHECK( path( "c:/../foo" ).normalize(), "c:/../foo" );
- PATH_CHECK( path( "c:/../foo/" ).normalize(), "c:/../foo/." );
- PATH_CHECK( path( "c:/../../foo" ).normalize(), "c:/../../foo" );
- PATH_CHECK( path( "c:/../../foo/" ).normalize(), "c:/../../foo/." );
- PATH_CHECK( path( "c:/..foo" ).normalize(), "c:/..foo" );
- }
- else // POSIX
- {
- PATH_CHECK( path( "c:.." ).normalize(), "c:.." );
- PATH_CHECK( path( "c:foo/.." ).normalize(), "." );
- PATH_CHECK( path( "c:foo/../" ).normalize(), "./." );
- PATH_CHECK( path( "c:/foo/.." ).normalize(), "c:" );
- PATH_CHECK( path( "c:/foo/../" ).normalize(), "c:/." );
- PATH_CHECK( path( "c:/.." ).normalize(), "." );
- PATH_CHECK( path( "c:/../" ).normalize(), "./." );
- PATH_CHECK( path( "c:/../.." ).normalize(), ".." );
- PATH_CHECK( path( "c:/../../" ).normalize(), "../." );
- PATH_CHECK( path( "c:/../foo" ).normalize(), "foo" );
- PATH_CHECK( path( "c:/../foo/" ).normalize(), "foo/." );
- PATH_CHECK( path( "c:/../../foo" ).normalize(), "../foo" );
- PATH_CHECK( path( "c:/../../foo/" ).normalize(), "../foo/." );
- PATH_CHECK( path( "c:/..foo" ).normalize(), "c:/..foo" );
- }
- }
 
   void exception_tests()
   {
@@ -343,12 +241,10 @@
     PATH_CHECK( path("c:") / "/foo", "c:/foo" );
   }
 
- check_normalize();
-
   if ( platform == "Windows" )
   {
- PATH_CHECK( path("c:", fs::native ) / "foo", "c:foo" );
- PATH_CHECK( path("c:", fs::native) / "/foo", "c:/foo" );
+ PATH_CHECK( path("c:") / "foo", "c:foo" );
+ PATH_CHECK( path("c:") / "/foo", "c:/foo" );
   }
 
   PATH_CHECK( "foo/bar", "foo/bar" );

Modified: branches/release/libs/filesystem/test/wide_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/wide_test.cpp (original)
+++ branches/release/libs/filesystem/test/wide_test.cpp 2008-10-13 10:55:34 EDT (Mon, 13 Oct 2008)
@@ -10,6 +10,9 @@
 
 #include <boost/config/warning_disable.hpp>
 
+// See deprecated_test for tests of deprecated features
+#define BOOST_FILESYSTEM_NO_DEPRECATED
+
 #include <boost/filesystem/config.hpp>
 # ifdef BOOST_FILESYSTEM_NARROW_ONLY
 # error This compiler or standard library does not support wide-character strings or paths


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