diff --git a/include/boost/filesystem.hpp b/include/boost/filesystem.hpp index f5cc2b9..f8b9353 100644 --- a/include/boost/filesystem.hpp +++ b/include/boost/filesystem.hpp @@ -15,12 +15,13 @@ # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 +# endif # if !defined(BOOST_FILESYSTEM_VERSION) # define BOOST_FILESYSTEM_VERSION 2 # endif -#ifdef BOOST_FILESYSTEM_VERSION == 2 +#if BOOST_FILESYSTEM_VERSION == 2 # include # include # include @@ -34,4 +35,4 @@ # endif -#endif BOOST_FILESYSTEM_FILESYSTEM_HPP +#endif // BOOST_FILESYSTEM_FILESYSTEM_HPP diff --git a/include/boost/filesystem/fstream.hpp b/include/boost/filesystem/fstream.hpp new file mode 100644 index 0000000..ae44cd9 --- /dev/null +++ b/include/boost/filesystem/fstream.hpp @@ -0,0 +1,32 @@ +// boost/filesystem/fstream.hpp ------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM_FSTREAMX_HPP +#define BOOST_FILESYSTEM_FSTREAMX_HPP + +# if defined(BOOST_FILESYSTEM_VERSION) \ + && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 +# error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 +# endif + +# if !defined(BOOST_FILESYSTEM_VERSION) +# define BOOST_FILESYSTEM_VERSION 2 +# endif + +#if BOOST_FILESYSTEM_VERSION == 2 +# include + +# else +# include + +# endif + +#endif // BOOST_FILESYSTEM_FSTREAMX_HPP diff --git a/include/boost/filesystem/v3/convenience.hpp b/include/boost/filesystem/v3/convenience.hpp index f1c4e38..18ff2b0 100644 --- a/include/boost/filesystem/v3/convenience.hpp +++ b/include/boost/filesystem/v3/convenience.hpp @@ -48,5 +48,21 @@ namespace boost } // namespace filesystem3 } // 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/v3/fstream.hpp b/include/boost/filesystem/v3/fstream.hpp index 292806c..1d45122 100644 --- a/include/boost/filesystem/v3/fstream.hpp +++ b/include/boost/filesystem/v3/fstream.hpp @@ -166,11 +166,37 @@ namespace filesystem3 typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; - typedef basic_fstream wfstream; typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; } // namespace filesystem3 } // 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/v3/operations.hpp b/include/boost/filesystem/v3/operations.hpp index e1c7704..2b2d2ad 100644 --- a/include/boost/filesystem/v3/operations.hpp +++ b/include/boost/filesystem/v3/operations.hpp @@ -951,6 +951,7 @@ namespace boost using filesystem3::is_symlink; using filesystem3::last_write_time; using filesystem3::read_symlink; + using filesystem3::recursive_directory_iterator; using filesystem3::regular_file; using filesystem3::remove; using filesystem3::remove_all; @@ -974,6 +975,10 @@ namespace boost //using filesystem3::wdirectory_iterator; //using filesystem3::wdirectory_entry; # endif + namespace detail + { + using filesystem3::detail::possible_large_file_size_support; + } } } diff --git a/v3/example/simple_ls.cpp b/v3/example/simple_ls.cpp index db2939e..b192513 100644 --- a/v3/example/simple_ls.cpp +++ b/v3/example/simple_ls.cpp @@ -8,6 +8,8 @@ // See http://www.boost.org/libs/filesystem for documentation. +#define BOOST_FILESYSTEM_VERSION 3 + // As an example program, we don't want to use any deprecated features #define BOOST_FILESYSTEM_NO_DEPRECATED diff --git a/v3/src/utf8_codecvt_facet.hpp b/v3/src/utf8_codecvt_facet.hpp index 3b78fb1..360346a 100644 --- a/v3/src/utf8_codecvt_facet.hpp +++ b/v3/src/utf8_codecvt_facet.hpp @@ -4,13 +4,13 @@ // Distributed under the Boost Software License, Version 1.0. // (See http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP -#define BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP +#ifndef BOOST_FILESYSTEM3_UTF8_CODECVT_FACET_HPP +#define BOOST_FILESYSTEM3_UTF8_CODECVT_FACET_HPP -#include +#include #define BOOST_UTF8_BEGIN_NAMESPACE \ - namespace boost { namespace filesystem { namespace detail { + namespace boost { namespace filesystem3 { namespace detail { #define BOOST_UTF8_END_NAMESPACE }}} #define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL @@ -21,4 +21,17 @@ #undef BOOST_UTF8_END_NAMESPACE #undef BOOST_UTF8_DECL +//----------------------------------------------------------------------------// + +namespace boost +{ + namespace filesystem + { + namespace detail + { + using filesystem3::detail::utf8_codecvt_facet; + } + } +} + #endif