]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/filesystem/example/directory_symlink_parent_resolution.cpp
1 // directory_symlink_parent_resolution.cpp -------------------------------------------//
3 // Copyright Beman Dawes 2015
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
8 // Library home page: http://www.boost.org/libs/filesystem
10 #include <boost/filesystem.hpp>
11 #include <boost/filesystem/string_file.hpp>
12 #include <boost/detail/lightweight_main.hpp>
17 using namespace boost::filesystem
;
19 int cpp_main(int argc
, char* argv
[])
21 # ifdef BOOST_WINDOWS_API
22 cout
<< "BOOST_WINDOWS_API" << endl
;
24 cout
<< "BOOST_POSIX_API" << endl
;
27 path
test_dir(current_path() / "dspr_demo");
30 create_directories(test_dir
/ "a/c/d");
31 current_path(test_dir
/ "a");
32 create_directory_symlink("c/d", "b");
33 save_string_file("name.txt", "Windows");
34 save_string_file("c/name.txt", "POSIX");
35 current_path(test_dir
);
37 load_string_file("a/b/../name.txt", s
);