Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:35:37

0001 //  boost/filesystem/convenience.hpp  ----------------------------------------//
0002 
0003 //  Copyright Beman Dawes, 2002-2005
0004 //  Copyright Vladimir Prus, 2002
0005 
0006 //  Use, modification, and distribution is subject to the Boost Software
0007 //  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0008 //  http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 //  See library home page at http://www.boost.org/libs/filesystem
0011 
0012 //----------------------------------------------------------------------------//
0013 
0014 #ifndef BOOST_FILESYSTEM_CONVENIENCE_HPP
0015 #define BOOST_FILESYSTEM_CONVENIENCE_HPP
0016 
0017 #include <boost/filesystem/config.hpp>
0018 #include <boost/filesystem/operations.hpp>
0019 #include <boost/system/error_code.hpp>
0020 
0021 #include <boost/filesystem/detail/header.hpp> // must be the last #include
0022 
0023 namespace boost {
0024 namespace filesystem {
0025 
0026 #ifndef BOOST_FILESYSTEM_NO_DEPRECATED
0027 
0028 BOOST_FILESYSTEM_DETAIL_DEPRECATED("Use path::extension() instead")
0029 inline std::string extension(const path& p)
0030 {
0031     return p.extension().string();
0032 }
0033 
0034 BOOST_FILESYSTEM_DETAIL_DEPRECATED("Use path::stem() instead")
0035 inline std::string basename(const path& p)
0036 {
0037     return p.stem().string();
0038 }
0039 
0040 BOOST_FILESYSTEM_DETAIL_DEPRECATED("Use path::replace_extension() instead")
0041 inline path change_extension(const path& p, const path& new_extension)
0042 {
0043     path new_p(p);
0044     new_p.replace_extension(new_extension);
0045     return new_p;
0046 }
0047 
0048 #endif
0049 
0050 } // namespace filesystem
0051 } // namespace boost
0052 
0053 #include <boost/filesystem/detail/footer.hpp>
0054 
0055 #endif // BOOST_FILESYSTEM_CONVENIENCE_HPP