summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-11 18:19:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-11 19:20:07 (GMT)
commit857e44c156a1dbefcb49bb5792c4384cebd8762a (patch)
tree11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/boost/filesystem/operations.hpp
parent77d4eb7588e113beaa03f3347523b26adefdeb06 (diff)
downloadswift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip
swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/boost/filesystem/operations.hpp')
-rw-r--r--3rdParty/Boost/src/boost/filesystem/operations.hpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/filesystem/operations.hpp b/3rdParty/Boost/src/boost/filesystem/operations.hpp
index 5c2080c..4d52ab7 100644
--- a/3rdParty/Boost/src/boost/filesystem/operations.hpp
+++ b/3rdParty/Boost/src/boost/filesystem/operations.hpp
@@ -15,6 +15,7 @@
#define BOOST_FILESYSTEM_OPERATIONS_HPP
#include <boost/filesystem/path.hpp>
+#include <boost/detail/scoped_enum_emulation.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/enable_if.hpp>
@@ -182,7 +183,7 @@ namespace boost
BOOST_FILESYSTEM_DECL system::error_code
rename_api( const std::string & from, const std::string & to );
BOOST_FILESYSTEM_DECL system::error_code
- copy_file_api( const std::string & from, const std::string & to );
+ copy_file_api( const std::string & from, const std::string & to, bool fail_if_exists );
# if defined(BOOST_WINDOWS_API)
@@ -226,7 +227,7 @@ namespace boost
BOOST_FILESYSTEM_DECL system::error_code
rename_api( const std::wstring & from, const std::wstring & to );
BOOST_FILESYSTEM_DECL system::error_code
- copy_file_api( const std::wstring & from, const std::wstring & to );
+ copy_file_api( const std::wstring & from, const std::wstring & to, bool fail_if_exists );
# endif
# endif
@@ -506,11 +507,16 @@ namespace boost
from_path, to_path, ec ) );
}
- BOOST_FS_FUNC(void) copy_file( const Path & from_path, const Path & to_path )
+ BOOST_SCOPED_ENUM_START(copy_option)
+ { fail_if_exists, overwrite_if_exists };
+ BOOST_SCOPED_ENUM_END
+
+ BOOST_FS_FUNC(void) copy_file( const Path & from_path, const Path & to_path,
+ BOOST_SCOPED_ENUM(copy_option) option = copy_option::fail_if_exists )
{
system::error_code ec( detail::copy_file_api(
from_path.external_directory_string(),
- to_path.external_directory_string() ) );
+ to_path.external_directory_string(), option == copy_option::fail_if_exists ) );
if ( ec )
boost::throw_exception( basic_filesystem_error<Path>(
"boost::filesystem::copy_file",
@@ -659,9 +665,9 @@ namespace boost
{ return is_symlink<wpath>( ph ); }
inline bool is_empty( const path & ph )
- { return is_empty<path>( ph ); }
+ { return boost::filesystem::is_empty<path>( ph ); }
inline bool is_empty( const wpath & ph )
- { return is_empty<wpath>( ph ); }
+ { return boost::filesystem::is_empty<wpath>( ph ); }
inline bool equivalent( const path & ph1, const path & ph2 )
{ return equivalent<path>( ph1, ph2 ); }