]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/filesystem/convenience.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / filesystem / convenience.hpp
CommitLineData
7c673cae
FG
1// boost/filesystem/convenience.hpp ----------------------------------------//
2
3// Copyright Beman Dawes, 2002-2005
4// Copyright Vladimir Prus, 2002
1e59de90 5
7c673cae
FG
6// Use, modification, and distribution is subject to the Boost Software
7// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt)
9
10// See library home page at http://www.boost.org/libs/filesystem
11
92f5a8d4 12//----------------------------------------------------------------------------//
7c673cae 13
1e59de90
TL
14#ifndef BOOST_FILESYSTEM_CONVENIENCE_HPP
15#define BOOST_FILESYSTEM_CONVENIENCE_HPP
7c673cae 16
1e59de90 17#include <boost/filesystem/config.hpp>
7c673cae
FG
18#include <boost/filesystem/operations.hpp>
19#include <boost/system/error_code.hpp>
20
1e59de90 21#include <boost/filesystem/detail/header.hpp> // must be the last #include
7c673cae 22
1e59de90
TL
23namespace boost {
24namespace filesystem {
7c673cae 25
1e59de90 26#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
7c673cae 27
1e59de90
TL
28inline std::string extension(const path& p)
29{
30 return p.extension().string();
31}
7c673cae 32
1e59de90
TL
33inline std::string basename(const path& p)
34{
35 return p.stem().string();
36}
7c673cae 37
1e59de90
TL
38inline path change_extension(const path& p, const path& new_extension)
39{
40 path new_p(p);
41 new_p.replace_extension(new_extension);
42 return new_p;
43}
7c673cae 44
1e59de90 45#endif
7c673cae 46
1e59de90 47} // namespace filesystem
7c673cae
FG
48} // namespace boost
49
1e59de90
TL
50#include <boost/filesystem/detail/footer.hpp>
51
52#endif // BOOST_FILESYSTEM_CONVENIENCE_HPP