-
-
+
+
Filesystem Library
Version 3
@@ -66,41 +66,9 @@
- This is the home page for Version 3 of the Filesystem library.
- Version 3 is a major revision with many new and improved
- features. It may, however, break some user code written for Version 2.
- To ease the transition, Boost releases 1.44 through 1.47
- will supply both V2 and V3. Version 2
- is the default version for Boost release 1.44
- and 1.45. Version 3 will be the default starting with release 1.46.
- Define macro BOOST_FILESYSTEM_VERSION as 3 to use
- Version 3. This will be the default for release 1.46 and later.
- Define macro BOOST_FILESYSTEM_VERSION as 2 to use
- Version 2. This is the default for release 1.44 and 1.45.
- You may define the BOOST_FILESYSTEM_VERSION macro:
-
-
- On the build command line; the exact format depends on
- your compiler or IDE
-
-
- In your code, before including any filesystem header,
- #define BOOST_FILESYSTEM_VERSION n
-
-
- #define BOOST_FILESYSTEM_VERSION n in boost/config/user.hpp.
- Note that this approach applies to all uses of Boost.Filesystem.
-
-
- Existing code should be moved to Version 3 as soon as
- convenient. New code should be written for Version 3.
- Version 2 is deprecated, and will not be included in Boost
- releases 1.48 and later.
- Building the library
- By default, the Boost build system creates libraries that
- support both version 2 and version 3. To support only a single version,
- include --disable-filesystem2 or --disable-filesystem3
- on the bjam command line.
+ This is Version 3 of the Filesystem library. Version 2 is
+ not longer supported. 1.49.0 was the last release of Boost to supply
+ Version 2
@@ -255,7 +223,7 @@ which may throw std::bad_alloc . These exceptions may be thrown even
though the error condition leading to the exception is not explicitly specified
in the function's "Throws" paragraph.
All exceptions thrown by the Filesystem
-Library are implemented by calling
+Library are implemented by calling
boost::throw_exception() . Thus exact behavior may differ depending on
BOOST_NO_EXCEPTIONS at the time the filesystem source files are compiled.
Non-throwing versions are provided of several functions that are often used
@@ -266,10 +234,10 @@ in contexts where error codes may be the preferred way to report an error.
The Boost.Filesystem library provides several headers:
- Header <boost/filesystem.hpp >
+ Header <boost/filesystem.hpp >
provides access to all features of the library, except file streams.
- Header <boost/filesystem/ fstream.hpp >
+ Header <boost/filesystem/ fstream.hpp >
inherits the same components as the C++ Standard
Library's fstream header, but files are identified by const path&
arguments rather that const char* arguments.
@@ -280,8 +248,8 @@ in contexts where error codes may be the preferred way to report an error.
The programs used to generate the Boost regression test status tables use the
Filesystem Library extensively. See:
The current implementation supports operating systems which provide
@@ -323,12 +291,12 @@ supported.
Building the object-library
The object-library will be built automatically if you are using the Boost
build system. See
-Getting Started . It can also be
+Getting Started . It can also be
built manually using a Jamfile
supplied in directory libs/filesystem/build, or the user can construct an IDE
project or make file which includes the object-library source files.
The object-library source files are
-supplied in directory libs/filesystem/src . These source files implement the
+supplied in directory libs/filesystem/src . These source files implement the
library for POSIX or Windows compatible operating systems; no implementation is
supplied for other operating systems. Note that many operating systems not
normally thought of as POSIX systems, such as mainframe legacy
@@ -483,7 +451,7 @@ version 1.31.0.
Revised
-20 February, 2011
+20 March, 2012
© Copyright Beman Dawes, 2002-2005
Use, modification, and distribution are subject to the Boost Software
diff --git a/doc/portability_guide.htm b/doc/portability_guide.htm
index 458e5dc..54b5a74 100644
--- a/doc/portability_guide.htm
+++ b/doc/portability_guide.htm
@@ -6,13 +6,13 @@
Portability Guide
-
+
- Path
+ Path
Name Portability
Guide
@@ -228,11 +228,11 @@ portability yet not overly restrict expressiveness.
Revised
-20 February, 2011
+20 March, 2012
© Copyright Beman Dawes, 2002, 2003
Use, modification, and distribution are subject to the Boost Software
-License, Version 1.0. (See accompanying file
+License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at
www.boost.org/LICENSE_1_0.txt )
diff --git a/doc/reference.html b/doc/reference.html
index 7d5ff4d..7ad2795 100644
--- a/doc/reference.html
+++ b/doc/reference.html
@@ -42,8 +42,8 @@ del { background-color:#FFA0A0 }
-
-
+
+
Filesystem Library
@@ -1330,7 +1330,7 @@ non-member functions
for two paths, p1 == p2 then
hash_value(p1) == hash_value(p2).
This allows paths to be used with
- Boost.Hash .
+ Boost.Hash .
bool operator< (const path& lhs, const path& rhs);
@@ -1388,7 +1388,7 @@ std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream&
Effects:
- os <<
+ os <<
boost::io::quoted (p.string<std::basic_string<Char>>(), static_cast<Char>('&'));
Returns:
os
@@ -1401,7 +1401,7 @@ inline std::basic_istream<Char, Traits>& operator>>(std::basic_i
Effects:
std::basic_string<Char> str;
is >>
- boost::io::quoted (str,
+ boost::io::quoted (str,
static_cast<Char>('&'));
p = str;
Returns:
@@ -2609,7 +2609,7 @@ uintmax_t hard_link_count(const path& p, system::error_code& ec);
const path& initial_path ();
-const path& initial_path (system::error_code& ec);
+const path& initial_path (system::error_code& ec);
Returns:
current_path() as of the first call to initial_path().
@@ -3062,7 +3062,7 @@ path unique_path(const path& model, system::error_code& ec);
+<boost/filesystem/fstream.hpp>
Replacements are provided for the file stream classes from the C++ standard
library's <fstream> header. These replacement classes
publicly inherit from the standard library classes. In the Boost.Filesystem
@@ -3700,7 +3700,7 @@ multiple string types. His idea became the basis for the version 3 path design.<
www.boost.org/LICENSE_1_0.txt
Revised
-13 January 2012
+20 March 2012
diff --git a/doc/release_history.html b/doc/release_history.html
index 40030f9..534df36 100644
--- a/doc/release_history.html
+++ b/doc/release_history.html
@@ -6,7 +6,7 @@
Filesystem Release History
-
+
@@ -14,8 +14,8 @@
-
-
+
+
Filesystem Release History
@@ -24,7 +24,7 @@
- Boost Home
+ Boost Home
Library Home Reference
Tutorial
FAQ
@@ -123,7 +123,7 @@
Revised
-17 March, 2012
+20 March, 2012
© Copyright Beman Dawes, 2011
Use, modification, and distribution are subject to the Boost Software
License, Version 1.0. See
diff --git a/doc/src/boost_snippets.html b/doc/src/boost_snippets.html
index 16851aa..c06e6ae 100644
--- a/doc/src/boost_snippets.html
+++ b/doc/src/boost_snippets.html
@@ -13,8 +13,8 @@ $id frontmatter=
-
-
+
+
Filesystem Library
@@ -52,7 +52,7 @@ $endid
$id wording_suffix=
+<boost/filesystem/fstream.hpp>
Replacements are provided for the file stream classes from the C++ standard
library's <fstream> header. These replacement classes
publicly inherit from the standard library classes. In the Boost.Filesystem
@@ -115,7 +115,7 @@ $id backmatter=>
www.boost.org/LICENSE_1_0.txt
Revised
-13 January 2012
+20 March 2012
$endid
diff --git a/doc/src/build.bat b/doc/src/build.bat
index c787591..b7615d0 100644
--- a/doc/src/build.bat
+++ b/doc/src/build.bat
@@ -1,5 +1,5 @@
@echo off
-del tr2.html >nul
+del tr2.html 2>nul
mmp TARGET=TR2 source.html tr2.html
-del reference.html >nul
+del reference.html 2>nul
mmp TARGET=BOOST source.html reference.html
diff --git a/doc/src/source.html b/doc/src/source.html
index 4a7772e..c97b3b2 100644
--- a/doc/src/source.html
+++ b/doc/src/source.html
@@ -1,5 +1,7 @@
-
+
+
+
@@ -32,7 +34,7 @@ $else
$endif
@@ -1287,7 +1289,7 @@ non-member functions
for two paths, p1 == p2 then
hash_value(p1) == hash_value(p2).
This allows paths to be used with
- Boost.Hash .
+ Boost.Hash .
bool operator< (const path& lhs, const path& rhs);
@@ -1345,7 +1347,7 @@ std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream&
Effects:
- os <<
+ os <<
boost::io::quoted (p.string<std::basic_string<Char>>(), static_cast<Char>('&'));
Returns:
os
@@ -1358,7 +1360,7 @@ inline std::basic_istream<Char, Traits>& operator>>(std::basic_i
Effects:
std::basic_string<Char> str;
is >>
- boost::io::quoted (str,
+ boost::io::quoted (str,
static_cast<Char>('&'));
p = str;
Returns:
@@ -2546,7 +2548,7 @@ uintmax_t hard_link_count(const path& p, system::error_code& ec);
const path& initial_path ();
-const path& initial_path (system::error_code& ec);
+const path& initial_path (system::error_code& ec);
Returns:
current_path() as of the first call to initial_path().
diff --git a/doc/src/tr2_snippets.html b/doc/src/tr2_snippets.html
index b79bc92..dbf49ab 100644
--- a/doc/src/tr2_snippets.html
+++ b/doc/src/tr2_snippets.html
@@ -1,5 +1,7 @@
-
+
+
+
@@ -18,7 +20,7 @@ $id frontmatter=
Date:
- 2012-03-16
+ 2012-03-20
Project:
diff --git a/doc/tutorial.html b/doc/tutorial.html
index f275cb6..0dbebec 100644
--- a/doc/tutorial.html
+++ b/doc/tutorial.html
@@ -6,7 +6,7 @@
Filesystem Tutorial
-
+
@@ -14,8 +14,8 @@
-
-
+
+
Filesystem Tutorial
@@ -158,7 +158,7 @@ containing the size of the file named by the argument. The declaration looks
like this:
- uintmax_t file_size (const path& p);
+ uintmax_t file_size(const path& p);
For now, all you need to know is that class path has constructors that take
const char * and many other useful types. (If you can't wait to
@@ -1095,7 +1095,7 @@ on an
operational error. filesystem_error is derived from std::runtime_error.
It has a
member function to obtain the
-error_code reported by the source
+error_code reported by the source
of the error. It also has member functions to obtain the path or paths that caused
the error.
@@ -1121,7 +1121,7 @@ It has a
Distributed under the Boost Software License, Version 1.0. See
www.boost.org/LICENSE_1_0.txt
Revised
-20 February 2011
+20 March 2012
diff --git a/doc/v3.html b/doc/v3.html
index 83dafbf..3b75140 100644
--- a/doc/v3.html
+++ b/doc/v3.html
@@ -5,15 +5,15 @@
Filesystem V3 Intro
-
+
-
-
+
+
Filesystem
Version 3
@@ -144,7 +144,7 @@ cycle, and then Version 3 will become the default version.
Distributed under the Boost Software License, Version 1.0. See
www.boost.org/LICENSE_1_0.txt
Revised
-20 February 2011
+20 March 2012
diff --git a/doc/v3_design.html b/doc/v3_design.html
index c5204ff..cea4f12 100644
--- a/doc/v3_design.html
+++ b/doc/v3_design.html
@@ -6,7 +6,7 @@
Filesystem V3 Design
-
+
@@ -14,8 +14,8 @@
-
-
+
+
Filesystem Version 3
Design
@@ -180,7 +180,7 @@ copy_directory, copy_symlink, and read_symlink functions.
Revised
-20 February, 2011
+20 March, 2012
© Copyright Beman Dawes, 2008
Use, modification, and distribution are subject to the Boost Software
diff --git a/include/boost/filesystem/convenience.hpp b/include/boost/filesystem/convenience.hpp
index 1a1f943..f0bd986 100644
--- a/include/boost/filesystem/convenience.hpp
+++ b/include/boost/filesystem/convenience.hpp
@@ -19,14 +19,14 @@
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-#include
+#include
#include
#include // must be the last #include
namespace boost
{
- namespace filesystem3
+ namespace filesystem
{
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
@@ -51,24 +51,8 @@ namespace boost
# endif
- } // namespace filesystem3
+ } // namespace filesystem
} // namespace boost
-//----------------------------------------------------------------------------//
-
-namespace boost
-{
- namespace filesystem
- {
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- using filesystem3::extension;
- using filesystem3::basename;
- using filesystem3::change_extension;
-# endif
- }
-}
-
-//----------------------------------------------------------------------------//
-
#include // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM3_CONVENIENCE_HPP
diff --git a/include/boost/filesystem/fstream.hpp b/include/boost/filesystem/fstream.hpp
index 60a2a3b..0727238 100644
--- a/include/boost/filesystem/fstream.hpp
+++ b/include/boost/filesystem/fstream.hpp
@@ -18,7 +18,7 @@
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-#include
+#include
#include
#include
@@ -36,7 +36,7 @@
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
//--------------------------------------------------------------------------------------//
@@ -175,34 +175,8 @@ namespace filesystem3
typedef basic_ofstream wofstream;
typedef basic_fstream wfstream;
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
-//----------------------------------------------------------------------------//
-
-namespace boost
-{
- namespace filesystem
- {
- using filesystem3::filebuf;
- using filesystem3::ifstream;
- using filesystem3::ofstream;
- using filesystem3::fstream;
- using filesystem3::wfilebuf;
- using filesystem3::wifstream;
- using filesystem3::wfstream;
- using filesystem3::wofstream;
- using filesystem3::basic_filebuf;
- using filesystem3::basic_ifstream;
- using filesystem3::basic_ofstream;
- using filesystem3::basic_fstream;
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
-# endif
- }
-}
-
-//----------------------------------------------------------------------------//
-
#include // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM3_FSTREAM_HPP
diff --git a/include/boost/filesystem/operations.hpp b/include/boost/filesystem/operations.hpp
index ace3bc8..dc01b7d 100644
--- a/include/boost/filesystem/operations.hpp
+++ b/include/boost/filesystem/operations.hpp
@@ -21,8 +21,8 @@
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-#include
-#include
+#include
+#include
#include
#include
@@ -51,7 +51,7 @@
namespace boost
{
- namespace filesystem3
+ namespace filesystem
{
//--------------------------------------------------------------------------------------//
@@ -1089,111 +1089,8 @@ namespace detail
BOOST_FILESYSTEM_DECL bool possible_large_file_size_support();
}
- } // namespace filesystem3
+ } // namespace filesystem
} // namespace boost
-//----------------------------------------------------------------------------//
-
-namespace boost
-{
- namespace filesystem
- {
- // permissions
- using filesystem3::no_perms;
- using filesystem3::owner_read;
- using filesystem3::owner_write;
- using filesystem3::owner_exe;
- using filesystem3::owner_all;
- using filesystem3::group_read;
- using filesystem3::group_write;
- using filesystem3::group_exe;
- using filesystem3::group_all;
- using filesystem3::others_read;
- using filesystem3::others_write;
- using filesystem3::others_exe;
- using filesystem3::others_all;
- using filesystem3::all_all;
- using filesystem3::set_uid_on_exe;
- using filesystem3::set_gid_on_exe;
- using filesystem3::sticky_bit;
- using filesystem3::perms_mask;
- using filesystem3::perms_not_known;
- using filesystem3::add_perms;
- using filesystem3::remove_perms;
- using filesystem3::symlink_perms;
-
- using filesystem3::absolute;
- using filesystem3::block_file;
- using filesystem3::canonical;
- using filesystem3::character_file;
-// using filesystem3::copy;
- using filesystem3::copy_file;
- using filesystem3::copy_option;
- using filesystem3::copy_symlink;
- using filesystem3::create_directories;
- using filesystem3::create_directory;
- using filesystem3::create_hard_link;
- using filesystem3::create_symlink;
- using filesystem3::create_directory_symlink;
- using filesystem3::current_path;
- using filesystem3::directory_entry;
- using filesystem3::directory_file;
- using filesystem3::directory_iterator;
- using filesystem3::equivalent;
- using filesystem3::exists;
- using filesystem3::fifo_file;
- using filesystem3::file_not_found;
- using filesystem3::file_size;
- using filesystem3::file_status;
- using filesystem3::file_type;
- using filesystem3::filesystem_error;
- using filesystem3::hard_link_count;
- using filesystem3::initial_path;
- using filesystem3::is_directory;
- using filesystem3::is_directory;
- using filesystem3::is_empty;
- using filesystem3::is_other;
- using filesystem3::is_regular_file;
- using filesystem3::is_symlink;
- using filesystem3::last_write_time;
- using filesystem3::permissions;
- using filesystem3::permissions_present;
- using filesystem3::perms;
- using filesystem3::read_symlink;
- using filesystem3::recursive_directory_iterator;
- using filesystem3::regular_file;
- using filesystem3::reparse_file;
- using filesystem3::remove;
- using filesystem3::remove_all;
- using filesystem3::rename;
- using filesystem3::resize_file;
- using filesystem3::socket_file;
- using filesystem3::space;
- using filesystem3::space_info;
- using filesystem3::status;
- using filesystem3::status_error;
- using filesystem3::status_known;
- using filesystem3::symlink_file;
- using filesystem3::symlink_option;
- using filesystem3::symlink_status;
- using filesystem3::system_complete;
- using filesystem3::temp_directory_path;
- using filesystem3::type_present;
- using filesystem3::type_unknown;
- using filesystem3::unique_path;
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- using filesystem3::is_regular;
- using filesystem3::status_unknown;
- using filesystem3::symbolic_link_exists;
- //using filesystem3::wdirectory_iterator;
- //using filesystem3::wdirectory_entry;
-# endif
- namespace detail
- {
- using filesystem3::detail::possible_large_file_size_support;
- }
- }
-}
-
#include // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM3_OPERATIONS_HPP
diff --git a/include/boost/filesystem/path.hpp b/include/boost/filesystem/path.hpp
index fb8c75a..d810325 100644
--- a/include/boost/filesystem/path.hpp
+++ b/include/boost/filesystem/path.hpp
@@ -21,8 +21,8 @@
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-#include
-#include // includes
+#include
+#include // includes
#include
#include
#include
@@ -43,7 +43,7 @@
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
//------------------------------------------------------------------------------------//
// //
@@ -516,7 +516,7 @@ namespace filesystem3
{
private:
friend class boost::iterator_core_access;
- friend class boost::filesystem3::path;
+ friend class boost::filesystem::path;
friend void m_path_iterator_increment(path::iterator & it);
friend void m_path_iterator_decrement(path::iterator & it);
@@ -718,41 +718,11 @@ namespace filesystem3
{ return generic_wstring(cvt); }
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
//----------------------------------------------------------------------------//
-namespace boost
-{
- namespace filesystem
- {
- using filesystem3::path;
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- using filesystem3::wpath;
-# endif
- using filesystem3::lexicographical_compare;
- using filesystem3::portable_posix_name;
- using filesystem3::windows_name;
- using filesystem3::portable_name;
- using filesystem3::portable_directory_name;
- using filesystem3::portable_file_name;
- using filesystem3::native;
- using filesystem3::swap;
- using filesystem3::operator<;
- using filesystem3::operator==;
- using filesystem3::operator!=;
- using filesystem3::operator>;
- using filesystem3::operator<=;
- using filesystem3::operator>=;
- using filesystem3::operator/;
- using filesystem3::operator<<;
- using filesystem3::operator>>;
- }
-}
-
-//----------------------------------------------------------------------------//
-
#include // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM_PATH_HPP
diff --git a/include/boost/filesystem/path_traits.hpp b/include/boost/filesystem/path_traits.hpp
index 13f1b20..10e7152 100644
--- a/include/boost/filesystem/path_traits.hpp
+++ b/include/boost/filesystem/path_traits.hpp
@@ -16,7 +16,7 @@
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-#include
+#include
#include
#include
#include
@@ -32,7 +32,7 @@
#include // must be the last #include
-namespace boost { namespace filesystem3 {
+namespace boost { namespace filesystem {
BOOST_FILESYSTEM_DECL const system::error_category& codecvt_error_category();
// uses std::codecvt_base::result used for error codes:
@@ -230,18 +230,6 @@ namespace path_traits {
}}} // namespace boost::filesystem::path_traits
-//----------------------------------------------------------------------------//
-
-namespace boost
-{
- namespace filesystem
- {
- using filesystem3::codecvt_error_category;
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
-# endif
- }
-}
-
#include // pops abi_prefix.hpp pragmas
#endif // BOOST_FILESYSTEM_PATH_TRAITS_HPP
diff --git a/index.html b/index.html
index bbd0918..1803c23 100644
--- a/index.html
+++ b/index.html
@@ -7,8 +7,7 @@ Automatic redirection failed, please go to
doc/index.htm .
© Copyright Beman Dawes, 2003
- Distributed under the Boost Software
-License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-www.boost.org/LICENSE_1_0.txt )
+ Distributed under the Boost Software License, Version 1.0.
+See http://www.boost.org/LICENSE_1_0.txt
diff --git a/src/codecvt_error_category.cpp b/src/codecvt_error_category.cpp
index b35b4a9..245c3f3 100644
--- a/src/codecvt_error_category.cpp
+++ b/src/codecvt_error_category.cpp
@@ -9,13 +9,6 @@
//--------------------------------------------------------------------------------------//
-#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
-
#include
// define BOOST_FILESYSTEM_SOURCE so that knows
@@ -26,8 +19,8 @@
# define BOOST_SYSTEM_NO_DEPRECATED
#endif
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -78,7 +71,7 @@ namespace
namespace boost
{
- namespace filesystem3
+ namespace filesystem
{
BOOST_FILESYSTEM_DECL const boost::system::error_category& codecvt_error_category()
@@ -87,7 +80,5 @@ namespace boost
return codecvt_error_cat_const;
}
- } // namespace filesystem3
+ } // namespace filesystem
} // namespace boost
-
-#endif // no wide character support
diff --git a/src/operations.cpp b/src/operations.cpp
index 226f107..629a99d 100644
--- a/src/operations.cpp
+++ b/src/operations.cpp
@@ -29,16 +29,8 @@
#define _FILE_OFFSET_BITS 64
#endif
-#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
-
// define BOOST_FILESYSTEM_SOURCE so that knows
// the library is being built (possibly exporting rather than importing code)
-
#define BOOST_FILESYSTEM_SOURCE
#ifndef BOOST_SYSTEM_NO_DEPRECATED
@@ -49,7 +41,7 @@
# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
#endif
-#include
+#include
#include
#include
#include
@@ -66,10 +58,10 @@
# include
#endif
-namespace fs = boost::filesystem3;
-using boost::filesystem3::path;
-using boost::filesystem3::filesystem_error;
-using boost::filesystem3::perms;
+namespace fs = boost::filesystem;
+using boost::filesystem::path;
+using boost::filesystem::filesystem_error;
+using boost::filesystem::perms;
using boost::system::error_code;
using boost::system::error_category;
using boost::system::system_category;
@@ -251,7 +243,7 @@ namespace
fs::file_type query_file_type(const path& p, error_code* ec);
- boost::filesystem3::directory_iterator end_dir_itr;
+ boost::filesystem::directory_iterator end_dir_itr;
const std::size_t buf_size(128);
const error_code ok;
@@ -707,7 +699,7 @@ namespace
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
BOOST_FILESYSTEM_DECL
@@ -1860,7 +1852,7 @@ namespace path_traits
}
} // namespace path_traits
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
//--------------------------------------------------------------------------------------//
@@ -2083,7 +2075,7 @@ namespace
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
namespace detail
@@ -2203,7 +2195,5 @@ namespace detail
}
}
} // namespace detail
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
-
-#endif // no wide character support
diff --git a/src/path.cpp b/src/path.cpp
index 0365b68..1df4a5e 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -7,12 +7,12 @@
// Library home page: http://www.boost.org/libs/filesystem
+// Old standard library configurations, particularly MingGW, don't support wide strings.
+// Report this with an explicit error message.
#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
// define BOOST_FILESYSTEM_SOURCE so that knows
// the library is being built (possibly exporting rather than importing code)
@@ -22,8 +22,8 @@
# define BOOST_SYSTEM_NO_DEPRECATED
#endif
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -44,9 +44,9 @@
# include
#endif
-namespace fs = boost::filesystem3;
+namespace fs = boost::filesystem;
-using boost::filesystem3::path;
+using boost::filesystem::path;
using std::string;
using std::wstring;
@@ -140,7 +140,7 @@ namespace
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
path& path::operator/=(const path& p)
{
@@ -439,7 +439,7 @@ namespace filesystem3
return *this;
}
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
//--------------------------------------------------------------------------------------//
@@ -520,16 +520,16 @@ namespace
&& is_separator(path[1])) return string_type::npos;
# ifdef BOOST_WINDOWS_API
- // case "\\?\"
- if (size > 4
- && is_separator(path[0])
- && is_separator(path[1])
- && path[2] == questionmark
- && is_separator(path[3]))
- {
- string_type::size_type pos(path.find_first_of(separators, 4));
+ // case "\\?\"
+ if (size > 4
+ && is_separator(path[0])
+ && is_separator(path[1])
+ && path[2] == questionmark
+ && is_separator(path[3]))
+ {
+ string_type::size_type pos(path.find_first_of(separators, 4));
return pos < size ? pos : string_type::npos;
- }
+ }
# endif
// case "//net {/}"
@@ -624,7 +624,7 @@ namespace
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
path::iterator path::begin() const
{
@@ -738,7 +738,7 @@ namespace filesystem3
it.m_element.m_pathname = separator_string; // generic format; see docs
}
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
//--------------------------------------------------------------------------------------//
@@ -812,7 +812,7 @@ namespace
namespace boost
{
-namespace filesystem3
+namespace filesystem
{
const path::codecvt_type*& path::wchar_t_codecvt_facet()
@@ -837,7 +837,5 @@ namespace filesystem3
return temp;
}
-} // namespace filesystem3
+} // namespace filesystem
} // namespace boost
-
-#endif // has wide character support
diff --git a/src/path_traits.cpp b/src/path_traits.cpp
index 6606437..06ac798 100644
--- a/src/path_traits.cpp
+++ b/src/path_traits.cpp
@@ -9,13 +9,6 @@
//--------------------------------------------------------------------------------------//
-#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
-
// define BOOST_FILESYSTEM_SOURCE so that knows
// the library is being built (possibly exporting rather than importing code)
#define BOOST_FILESYSTEM_SOURCE
@@ -24,16 +17,16 @@
# define BOOST_SYSTEM_NO_DEPRECATED
#endif
-#include
-#include
+#include
+#include
#include
#include
#include // for codecvt_base::result
#include // for strlen
#include // for wcslen
-namespace pt = boost::filesystem3::path_traits;
-namespace fs = boost::filesystem3;
+namespace pt = boost::filesystem::path_traits;
+namespace fs = boost::filesystem;
namespace bs = boost::system;
//--------------------------------------------------------------------------------------//
@@ -130,7 +123,7 @@ namespace {
// path_traits //
//--------------------------------------------------------------------------------------//
-namespace boost { namespace filesystem3 { namespace path_traits {
+namespace boost { namespace filesystem { namespace path_traits {
//--------------------------------------------------------------------------------------//
// convert const char* to wstring //
@@ -204,6 +197,4 @@ namespace boost { namespace filesystem3 { namespace path_traits {
convert_aux(from, from_end, buf, buf+default_codecvt_buf_size, to, cvt);
}
}
-}}} // namespace boost::filesystem3::path_traits
-
-#endif // no wide character support
+}}} // namespace boost::filesystem::path_traits
diff --git a/src/portability.cpp b/src/portability.cpp
index 31e0176..b1a1352 100644
--- a/src/portability.cpp
+++ b/src/portability.cpp
@@ -9,13 +9,6 @@
//--------------------------------------------------------------------------------------//
-#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
-
// define BOOST_FILESYSTEM_SOURCE so that knows
// the library is being built (possibly exporting rather than importing code)
#define BOOST_FILESYSTEM_SOURCE
@@ -24,10 +17,10 @@
# define BOOST_SYSTEM_NO_DEPRECATED
#endif
-#include
-#include
+#include
+#include
-namespace fs = boost::filesystem3;
+namespace fs = boost::filesystem;
#include // SGI MIPSpro compilers need this
@@ -54,7 +47,7 @@ namespace
namespace boost
{
- namespace filesystem3
+ namespace filesystem
{
// name_check functions ----------------------------------------------//
@@ -122,7 +115,5 @@ namespace boost
;
}
- } // namespace filesystem3
+ } // namespace filesystem
} // namespace boost
-
-#endif // no wide character support
diff --git a/src/unique_path.cpp b/src/unique_path.cpp
index 1569b32..c25c315 100644
--- a/src/unique_path.cpp
+++ b/src/unique_path.cpp
@@ -1,4 +1,4 @@
-// filesystem system_crypt_random.cpp ------------------------------------------------//
+// filesystem unique_path.cpp --------------------------------------------------------//
// Copyright Beman Dawes 2010
@@ -9,13 +9,6 @@
//--------------------------------------------------------------------------------------//
-#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
-
// define BOOST_FILESYSTEM_SOURCE so that knows
// the library is being built (possibly exporting rather than importing code)
#define BOOST_FILESYSTEM_SOURCE
@@ -24,7 +17,7 @@
# define BOOST_SYSTEM_NO_DEPRECATED
#endif
-#include
+#include
# ifdef BOOST_POSIX_API
# include
@@ -112,7 +105,7 @@ void system_crypt_random(void* buf, std::size_t len, boost::system::error_code*
} // unnamed namespace
-namespace boost { namespace filesystem3 { namespace detail {
+namespace boost { namespace filesystem { namespace detail {
BOOST_FILESYSTEM_DECL
path unique_path(const path& model, system::error_code* ec)
@@ -147,5 +140,3 @@ path unique_path(const path& model, system::error_code* ec)
}
}}}
-
-#endif // no wide character support
diff --git a/src/windows_file_codecvt.cpp b/src/windows_file_codecvt.cpp
index 85de59e..998db60 100644
--- a/src/windows_file_codecvt.cpp
+++ b/src/windows_file_codecvt.cpp
@@ -9,13 +9,6 @@
//--------------------------------------------------------------------------------------//
-#include
-#if !defined( BOOST_NO_STD_WSTRING )
-// Boost.Filesystem V3 and later requires std::wstring support.
-// During the transition to V3, libraries are compiled with both V2 and V3 sources.
-// On old compilers that don't support V3 anyhow, we just skip everything so the compile
-// will succeed and the library can be built.
-
// define BOOST_FILESYSTEM_SOURCE so that knows
// the library is being built (possibly exporting rather than importing code)
#define BOOST_FILESYSTEM_SOURCE
@@ -24,7 +17,7 @@
# define BOOST_SYSTEM_NO_DEPRECATED
#endif
-#include
+#include
#include // for mbstate_t
#ifdef BOOST_WINDOWS_API
@@ -80,4 +73,3 @@
# endif // BOOST_WINDOWS_API
-#endif // no wide character support
diff --git a/src/windows_file_codecvt.hpp b/src/windows_file_codecvt.hpp
index d845d37..52deab1 100644
--- a/src/windows_file_codecvt.hpp
+++ b/src/windows_file_codecvt.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
#define BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
-#include
+#include
#include
//------------------------------------------------------------------------------------//
diff --git a/test/Jamfile.v2 b/test/Jamfile.v2
index b076ffe..0820d86 100644
--- a/test/Jamfile.v2
+++ b/test/Jamfile.v2
@@ -2,7 +2,7 @@
# (C) Copyright Beman Dawes 2002-2006
# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
+# See www.boost.org/LICENSE_1_0.txt
project
: requirements
@@ -15,21 +15,19 @@ project
# to know if failures in shared library tests are related to sharing or not.
test-suite "filesystem" :
- [ run path_unit_test.cpp : : : shared ]
- [ run path_unit_test.cpp : : : static : path_unit_test_static ]
- [ run path_test.cpp : : : shared ]
- [ run path_test.cpp : : : static : path_test_static ]
- [ run operations_unit_test.cpp : : : shared ]
- [ run operations_unit_test.cpp : : : static : operations_unit_test_static ]
- [ run operations_test.cpp : : : shared ]
- [ run operations_test.cpp : : : static : operations_test_static ]
- [ run fstream_test.cpp ]
[ run convenience_test.cpp ]
- [ run large_file_support_test.cpp ]
[ run deprecated_test.cpp ]
+ [ run fstream_test.cpp ]
+ [ run large_file_support_test.cpp ]
+ [ run locale_info.cpp : : : always_show_run_output ]
+ [ run operations_test.cpp : : : shared always_show_run_output ]
+# [ run operations_test.cpp : : : static : operations_test_static ]
+ [ run operations_unit_test.cpp : : : shared ]
+ [ run path_test.cpp : : : shared ]
+# [ run path_test.cpp : : : static : path_test_static ]
+ [ run path_unit_test.cpp : : : shared ]
+# [ run path_unit_test.cpp : : : static : path_unit_test_static ]
[ run ../example/simple_ls.cpp ]
[ run ../example/file_status.cpp ]
-# [ compile ../example/mbcopy.cpp ]
-# [ compile ../example/mbpath.cpp ]
;
diff --git a/test/convenience_test.cpp b/test/convenience_test.cpp
index 17675a6..b24008f 100644
--- a/test/convenience_test.cpp
+++ b/test/convenience_test.cpp
@@ -8,14 +8,6 @@
// See library home page at http://www.boost.org/libs/filesystem
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
#include
// See deprecated_test for tests of deprecated features
@@ -27,9 +19,11 @@
#endif
#include
-namespace fs = boost::filesystem;
-using fs::path;
-namespace sys = boost::system;
+
+#include
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
#include
#include
@@ -37,6 +31,10 @@ namespace sys = boost::system;
#include
#include
+namespace fs = boost::filesystem;
+using fs::path;
+namespace sys = boost::system;
+
namespace
{
template< typename F >
diff --git a/test/deprecated_test.cpp b/test/deprecated_test.cpp
index de82ff8..c3cacfc 100644
--- a/test/deprecated_test.cpp
+++ b/test/deprecated_test.cpp
@@ -11,17 +11,15 @@
// This test verifies that various deprecated names still work. This is
// important to preserve existing code that uses the old names.
-#define BOOST_FILESYSTEM_VERSION 3
+#define BOOST_FILESYSTEM_DEPRECATED
+
+#include
#include
-
# if defined( BOOST_NO_STD_WSTRING )
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-#define BOOST_FILESYSTEM_DEPRECATED
-
-#include
#include
#include
diff --git a/test/fstream_test.cpp b/test/fstream_test.cpp
index d194033..fef1d7a 100644
--- a/test/fstream_test.cpp
+++ b/test/fstream_test.cpp
@@ -7,14 +7,6 @@
// Library home page: http://www.boost.org/libs/filesystem
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
#include
// See deprecated_test for tests of deprecated features
@@ -26,6 +18,12 @@
#endif
#include
+
+#include
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
#include
#include
#include
diff --git a/test/large_file_support_test.cpp b/test/large_file_support_test.cpp
index 287490e..553e09d 100644
--- a/test/large_file_support_test.cpp
+++ b/test/large_file_support_test.cpp
@@ -7,20 +7,17 @@
// See library home page at http://www.boost.org/libs/filesystem
-
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
// See deprecated_test for tests of deprecated features
#define BOOST_FILESYSTEM_NO_DEPRECATED
#define BOOST_SYSTEM_NO_DEPRECATED
#include
+
+#include
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
namespace fs = boost::filesystem;
#include
diff --git a/test/long_path_test.cpp b/test/long_path_test.cpp
index 65be7cb..fd4a7fc 100644
--- a/test/long_path_test.cpp
+++ b/test/long_path_test.cpp
@@ -9,8 +9,6 @@
// See http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%29.aspx
-#define BOOST_FILESYSTEM_VERSION 3
-
#include
#include
diff --git a/test/msvc10/common.props b/test/msvc10/common.props
index a341a58..b89fc28 100644
--- a/test/msvc10/common.props
+++ b/test/msvc10/common.props
@@ -7,8 +7,8 @@
- ../../../../../..;%(AdditionalIncludeDirectories)
- BOOST_FILESYSTEM_VERSION=3;BOOST_SYSTEM_NO_DEPRECATED;BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;%(PreprocessorDefinitions)
+ ../../../../..;%(AdditionalIncludeDirectories)
+ BOOST_SYSTEM_NO_DEPRECATED;BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;%(PreprocessorDefinitions)
Async
false
Level4
diff --git a/test/operations_test.cpp b/test/operations_test.cpp
index 610f27f..0f94149 100644
--- a/test/operations_test.cpp
+++ b/test/operations_test.cpp
@@ -7,14 +7,6 @@
// Library home page: http://www.boost.org/libs/filesystem
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
#include
// See deprecated_test for tests of deprecated features
@@ -26,12 +18,17 @@
#endif
#include
-#include
-namespace fs = boost::filesystem;
+#include
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
+#include
#include
#include
+namespace fs = boost::filesystem;
using boost::system::error_code;
using boost::system::system_category;
using boost::system::system_error;
diff --git a/test/operations_unit_test.cpp b/test/operations_unit_test.cpp
index b592fd9..b4c7f69 100644
--- a/test/operations_unit_test.cpp
+++ b/test/operations_unit_test.cpp
@@ -13,13 +13,6 @@
// ------------------------------------------------------------------------------------//
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
#include
@@ -32,6 +25,12 @@
#endif
#include // make sure filesystem.hpp works
+
+#include
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
#include
#include
#include
diff --git a/test/path_test.cpp b/test/path_test.cpp
index c3e64a7..a6bcda0 100644
--- a/test/path_test.cpp
+++ b/test/path_test.cpp
@@ -39,14 +39,6 @@
// //
//--------------------------------------------------------------------------------------//
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
#include
// See deprecated_test for tests of deprecated features
@@ -58,6 +50,12 @@
#endif
#include
+
+#include
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
#include
#include
#include
@@ -65,13 +63,12 @@
#include
#include
#include
+#include
+#include
namespace fs = boost::filesystem;
using boost::filesystem::path;
-#include
-#include
-
#ifdef BOOST_WINDOWS_API
# define BOOST_DIR_SEP "\\"
#else
diff --git a/test/path_unit_test.cpp b/test/path_unit_test.cpp
index 07d7e47..72818c9 100644
--- a/test/path_unit_test.cpp
+++ b/test/path_unit_test.cpp
@@ -19,14 +19,6 @@
//
// ---------------------------------------------------------------------------------- //
-#define BOOST_FILESYSTEM_VERSION 3
-
-#include
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
#include
// See deprecated_test for tests of deprecated features
@@ -38,6 +30,7 @@
#endif
#include
+
#include // for imbue tests
#include "test_codecvt.hpp" // for codecvt arg tests
#include
diff --git a/test/test_codecvt.hpp b/test/test_codecvt.hpp
index 32b2d36..9ce8b75 100644
--- a/test/test_codecvt.hpp
+++ b/test/test_codecvt.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_FILESYSTEM3_TEST_CODECVT_HPP
#define BOOST_FILESYSTEM3_TEST_CODECVT_HPP
-#include
+#include
#include
#include // for mbstate_t