Chris@16: // boost/filesystem/convenience.hpp ----------------------------------------// Chris@16: Chris@16: // Copyright Beman Dawes, 2002-2005 Chris@16: // Copyright Vladimir Prus, 2002 Chris@16: // Use, modification, and distribution is subject to the Boost Software Chris@16: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See library home page at http://www.boost.org/libs/filesystem Chris@16: Chris@16: //----------------------------------------------------------------------------// Chris@16: Chris@16: #ifndef BOOST_FILESYSTEM3_CONVENIENCE_HPP Chris@16: #define BOOST_FILESYSTEM3_CONVENIENCE_HPP Chris@16: Chris@16: #include Chris@16: Chris@16: # if defined( BOOST_NO_STD_WSTRING ) Chris@16: # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support Chris@16: # endif Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include // must be the last #include Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: namespace filesystem Chris@16: { Chris@16: Chris@16: # ifndef BOOST_FILESYSTEM_NO_DEPRECATED Chris@16: Chris@16: inline std::string extension(const path & p) Chris@16: { Chris@16: return p.extension().string(); Chris@16: } Chris@16: Chris@16: inline std::string basename(const path & p) Chris@16: { Chris@16: return p.stem().string(); Chris@16: } Chris@16: Chris@16: inline path change_extension( const path & p, const path & new_extension ) Chris@16: { Chris@16: path new_p( p ); Chris@16: new_p.replace_extension( new_extension ); Chris@16: return new_p; Chris@16: } Chris@16: Chris@16: # endif Chris@16: Chris@16: Chris@16: } // namespace filesystem Chris@16: } // namespace boost Chris@16: Chris@16: #include // pops abi_prefix.hpp pragmas Chris@16: #endif // BOOST_FILESYSTEM3_CONVENIENCE_HPP