Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/filesystem/convenience.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
rev | line source |
---|---|
Chris@16 | 1 // boost/filesystem/convenience.hpp ----------------------------------------// |
Chris@16 | 2 |
Chris@16 | 3 // Copyright Beman Dawes, 2002-2005 |
Chris@16 | 4 // Copyright Vladimir Prus, 2002 |
Chris@16 | 5 // Use, modification, and distribution is subject to the Boost Software |
Chris@16 | 6 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
Chris@16 | 7 // http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 8 |
Chris@16 | 9 // See library home page at http://www.boost.org/libs/filesystem |
Chris@16 | 10 |
Chris@16 | 11 //----------------------------------------------------------------------------// |
Chris@16 | 12 |
Chris@16 | 13 #ifndef BOOST_FILESYSTEM3_CONVENIENCE_HPP |
Chris@16 | 14 #define BOOST_FILESYSTEM3_CONVENIENCE_HPP |
Chris@16 | 15 |
Chris@16 | 16 #include <boost/config.hpp> |
Chris@16 | 17 |
Chris@16 | 18 # if defined( BOOST_NO_STD_WSTRING ) |
Chris@16 | 19 # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support |
Chris@16 | 20 # endif |
Chris@16 | 21 |
Chris@16 | 22 #include <boost/filesystem/operations.hpp> |
Chris@16 | 23 #include <boost/system/error_code.hpp> |
Chris@16 | 24 |
Chris@16 | 25 #include <boost/config/abi_prefix.hpp> // must be the last #include |
Chris@16 | 26 |
Chris@16 | 27 namespace boost |
Chris@16 | 28 { |
Chris@16 | 29 namespace filesystem |
Chris@16 | 30 { |
Chris@16 | 31 |
Chris@16 | 32 # ifndef BOOST_FILESYSTEM_NO_DEPRECATED |
Chris@16 | 33 |
Chris@16 | 34 inline std::string extension(const path & p) |
Chris@16 | 35 { |
Chris@16 | 36 return p.extension().string(); |
Chris@16 | 37 } |
Chris@16 | 38 |
Chris@16 | 39 inline std::string basename(const path & p) |
Chris@16 | 40 { |
Chris@16 | 41 return p.stem().string(); |
Chris@16 | 42 } |
Chris@16 | 43 |
Chris@16 | 44 inline path change_extension( const path & p, const path & new_extension ) |
Chris@16 | 45 { |
Chris@16 | 46 path new_p( p ); |
Chris@16 | 47 new_p.replace_extension( new_extension ); |
Chris@16 | 48 return new_p; |
Chris@16 | 49 } |
Chris@16 | 50 |
Chris@16 | 51 # endif |
Chris@16 | 52 |
Chris@16 | 53 |
Chris@16 | 54 } // namespace filesystem |
Chris@16 | 55 } // namespace boost |
Chris@16 | 56 |
Chris@16 | 57 #include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas |
Chris@16 | 58 #endif // BOOST_FILESYSTEM3_CONVENIENCE_HPP |