changed not to use Boost.FileSystem deprecated functions
@@ -1,6 +1,6 @@ | ||
1 | 1 | // zip.cpp: a simple ZIP compressing program |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -34,7 +34,6 @@ | ||
34 | 34 | } |
35 | 35 | |
36 | 36 | std::setlocale(LC_ALL, ""); |
37 | - fs::path::default_name_check(fs::no_check); | |
38 | 37 | |
39 | 38 | // file_descriptor_sink supports 64bit offset |
40 | 39 | ar::basic_zip_file_sink<io_ex::file_descriptor_sink> |
@@ -83,7 +82,7 @@ | ||
83 | 82 | { |
84 | 83 | io::copy( |
85 | 84 | io_ex::file_descriptor_source( |
86 | - head.path.native_file_string(), | |
85 | + head.path.file_string(), | |
87 | 86 | std::ios_base::binary), |
88 | 87 | zip |
89 | 88 | ); |
@@ -94,7 +93,7 @@ | ||
94 | 93 | |
95 | 94 | io::copy( |
96 | 95 | io_ex::file_descriptor_source( |
97 | - head.path.native_file_string(), | |
96 | + head.path.file_string(), | |
98 | 97 | std::ios_base::binary), |
99 | 98 | zip |
100 | 99 | ); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // lha.cpp: a simple LZH compressing program |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -38,7 +38,6 @@ | ||
38 | 38 | } |
39 | 39 | |
40 | 40 | std::setlocale(LC_ALL, ""); |
41 | - fs::path::default_name_check(fs::no_check); | |
42 | 41 | |
43 | 42 | // file_descriptor_sink supports 64bit offset |
44 | 43 | ar::basic_lzh_file_sink<io_ex::file_descriptor_sink> |
@@ -97,7 +96,7 @@ | ||
97 | 96 | { |
98 | 97 | io::copy( |
99 | 98 | io_ex::file_descriptor_source( |
100 | - head.path.native_file_string(), | |
99 | + head.path.file_string(), | |
101 | 100 | std::ios_base::binary), |
102 | 101 | lzh |
103 | 102 | ); |
@@ -108,7 +107,7 @@ | ||
108 | 107 | |
109 | 108 | io::copy( |
110 | 109 | io_ex::file_descriptor_source( |
111 | - head.path.native_file_string(), | |
110 | + head.path.file_string(), | |
112 | 111 | std::ios_base::binary), |
113 | 112 | lzh |
114 | 113 | ); |
@@ -1,4 +1,4 @@ | ||
1 | -// simple_unzip.cpp: a simple ZIP decompressing program | |
1 | +// unzip.cpp: a simple ZIP decompressing program | |
2 | 2 | |
3 | 3 | // Copyright Takeshi Mouri 2006-2008. |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
@@ -44,7 +44,6 @@ | ||
44 | 44 | } |
45 | 45 | |
46 | 46 | std::setlocale(LC_ALL, ""); |
47 | - fs::path::default_name_check(fs::no_check); | |
48 | 47 | |
49 | 48 | ar::zip_file_source zip(argv[1]); |
50 | 49 |
@@ -71,7 +70,7 @@ | ||
71 | 70 | io::copy( |
72 | 71 | zip, |
73 | 72 | io_ex::file_sink( |
74 | - head.path.native_file_string(), std::ios_base::binary) | |
73 | + head.path.file_string(), std::ios_base::binary) | |
75 | 74 | ); |
76 | 75 | } |
77 | 76 |
@@ -1,4 +1,4 @@ | ||
1 | -// simple_unlha.cpp: a simple LZH decompressing program | |
1 | +// unlha.cpp: a simple LZH decompressing program | |
2 | 2 | |
3 | 3 | // Copyright Takeshi Mouri 2006-2008. |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
@@ -44,7 +44,6 @@ | ||
44 | 44 | } |
45 | 45 | |
46 | 46 | std::setlocale(LC_ALL, ""); |
47 | - fs::path::default_name_check(fs::no_check); | |
48 | 47 | |
49 | 48 | ar::lzh_file_source lzh(argv[1]); |
50 | 49 |
@@ -71,7 +70,7 @@ | ||
71 | 70 | io::copy( |
72 | 71 | lzh, |
73 | 72 | io_ex::file_sink( |
74 | - head.path.native_file_string(), std::ios_base::binary) | |
73 | + head.path.file_string(), std::ios_base::binary) | |
75 | 74 | ); |
76 | 75 | } |
77 | 76 |
@@ -270,7 +270,6 @@ | ||
270 | 270 | } |
271 | 271 | |
272 | 272 | std::setlocale(LC_ALL, ""); |
273 | - fs::path::default_name_check(fs::no_check); | |
274 | 273 | |
275 | 274 | std::auto_ptr<extractor_base> ext_ptr; |
276 | 275 | const std::string filename(argv[1]); |
@@ -382,7 +381,7 @@ | ||
382 | 381 | io::copy( |
383 | 382 | boost::ref(*ext_ptr), |
384 | 383 | io_ex::file_sink( |
385 | - e.path.native_file_string(), std::ios_base::binary), | |
384 | + e.path.file_string(), std::ios_base::binary), | |
386 | 385 | 1024*8 |
387 | 386 | ); |
388 | 387 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // archive.cpp: multi-format archiver |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -289,7 +289,6 @@ | ||
289 | 289 | } |
290 | 290 | |
291 | 291 | std::setlocale(LC_ALL, ""); |
292 | - fs::path::default_name_check(fs::no_check); | |
293 | 292 | |
294 | 293 | std::auto_ptr<archiver_base> arc_ptr; |
295 | 294 | const std::string filename(argv[1]); |
@@ -418,7 +417,7 @@ | ||
418 | 417 | { |
419 | 418 | io::copy( |
420 | 419 | io_ex::file_source( |
421 | - e.path.native_file_string(), | |
420 | + e.path.file_string(), | |
422 | 421 | std::ios_base::binary), |
423 | 422 | boost::ref(*arc_ptr) |
424 | 423 | ); |
@@ -429,7 +428,7 @@ | ||
429 | 428 | |
430 | 429 | io::copy( |
431 | 430 | io_ex::file_source( |
432 | - e.path.native_file_string(), | |
431 | + e.path.file_string(), | |
433 | 432 | std::ios_base::binary), |
434 | 433 | boost::ref(*arc_ptr) |
435 | 434 | ); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // delete_zip.cpp: delete the specified entry from the ZIP file |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -52,7 +52,6 @@ | ||
52 | 52 | } |
53 | 53 | |
54 | 54 | std::setlocale(LC_ALL, ""); |
55 | - fs::path::default_name_check(fs::no_check); | |
56 | 55 | |
57 | 56 | fs::path zip_name(argv[1], fs::native); |
58 | 57 | const fs::path& bak_name = change_extension(zip_name, ".bak"); |
@@ -61,8 +60,8 @@ | ||
61 | 60 | fs::path del_name(argv[2], fs::native); |
62 | 61 | |
63 | 62 | { |
64 | - ar::raw_zip_file_source src(bak_name.native_file_string()); | |
65 | - ar::raw_zip_file_sink sink(zip_name.native_file_string()); | |
63 | + ar::raw_zip_file_source src(bak_name.file_string()); | |
64 | + ar::raw_zip_file_sink sink(zip_name.file_string()); | |
66 | 65 | |
67 | 66 | while (src.next_entry()) |
68 | 67 | { |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // tar.cpp: a simple tar archiver |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -41,7 +41,6 @@ | ||
41 | 41 | } |
42 | 42 | |
43 | 43 | std::setlocale(LC_ALL, ""); |
44 | - fs::path::default_name_check(fs::no_check); | |
45 | 44 | |
46 | 45 | // file_descriptor_sink supports 64bit offset |
47 | 46 | ar::basic_tar_file_sink<io_ex::file_descriptor_sink> |
@@ -102,7 +101,7 @@ | ||
102 | 101 | { |
103 | 102 | io::copy( |
104 | 103 | io_ex::file_descriptor_source( |
105 | - head.path.native_file_string(), | |
104 | + head.path.file_string(), | |
106 | 105 | std::ios_base::binary), |
107 | 106 | tar |
108 | 107 | ); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // delete_lha.cpp: delete the specified entry from the LZH file |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -52,7 +52,6 @@ | ||
52 | 52 | } |
53 | 53 | |
54 | 54 | std::setlocale(LC_ALL, ""); |
55 | - fs::path::default_name_check(fs::no_check); | |
56 | 55 | |
57 | 56 | fs::path lzh_name(argv[1], fs::native); |
58 | 57 | const fs::path& bak_name = change_extension(lzh_name, ".bak"); |
@@ -61,8 +60,8 @@ | ||
61 | 60 | fs::path del_name(argv[2], fs::native); |
62 | 61 | |
63 | 62 | { |
64 | - ar::raw_lzh_file_source src(bak_name.native_file_string()); | |
65 | - ar::raw_lzh_file_sink sink(lzh_name.native_file_string()); | |
63 | + ar::raw_lzh_file_source src(bak_name.file_string()); | |
64 | + ar::raw_lzh_file_sink sink(lzh_name.file_string()); | |
66 | 65 | |
67 | 66 | while (src.next_entry()) |
68 | 67 | { |
@@ -1,4 +1,4 @@ | ||
1 | -// simple_untar.cpp: a simple ZIP decompressing program | |
1 | +// untar.cpp: a simple ZIP decompressing program | |
2 | 2 | |
3 | 3 | // Copyright Takeshi Mouri 2006-2008. |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
@@ -39,7 +39,6 @@ | ||
39 | 39 | } |
40 | 40 | |
41 | 41 | std::setlocale(LC_ALL, ""); |
42 | - fs::path::default_name_check(fs::no_check); | |
43 | 42 | |
44 | 43 | ar::tar_file_source tar(argv[1]); |
45 | 44 |
@@ -80,7 +79,7 @@ | ||
80 | 79 | io::copy( |
81 | 80 | tar, |
82 | 81 | io_ex::file_sink( |
83 | - head.path.native_file_string(), std::ios_base::binary) | |
82 | + head.path.file_string(), std::ios_base::binary) | |
84 | 83 | ); |
85 | 84 | } |
86 | 85 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // iso.cpp: a simple ISO image archiver program |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -31,7 +31,6 @@ | ||
31 | 31 | } |
32 | 32 | |
33 | 33 | std::setlocale(LC_ALL, ""); |
34 | - fs::path::default_name_check(fs::no_check); | |
35 | 34 | |
36 | 35 | ar::iso_file_sink iso(argv[1]); |
37 | 36 |
@@ -89,7 +88,7 @@ | ||
89 | 88 | { |
90 | 89 | io::copy( |
91 | 90 | io_ex::file_source( |
92 | - head.path.native_file_string(), | |
91 | + head.path.file_string(), | |
93 | 92 | std::ios_base::binary), |
94 | 93 | iso |
95 | 94 | ); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // append_lha.cpp: append files to the existing LZH file |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -39,7 +39,6 @@ | ||
39 | 39 | } |
40 | 40 | |
41 | 41 | std::setlocale(LC_ALL, ""); |
42 | - fs::path::default_name_check(fs::no_check); | |
43 | 42 | |
44 | 43 | io_ex::file_sink file; |
45 | 44 | try |
@@ -108,7 +107,7 @@ | ||
108 | 107 | { |
109 | 108 | io::copy( |
110 | 109 | io_ex::file_source( |
111 | - head.path.native_file_string(), | |
110 | + head.path.file_string(), | |
112 | 111 | std::ios_base::binary), |
113 | 112 | lzh |
114 | 113 | ); |
@@ -119,7 +118,7 @@ | ||
119 | 118 | |
120 | 119 | io::copy( |
121 | 120 | io_ex::file_source( |
122 | - head.path.native_file_string(), | |
121 | + head.path.file_string(), | |
123 | 122 | std::ios_base::binary), |
124 | 123 | lzh |
125 | 124 | ); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // uniso.cpp: a simple ISO image extractor program |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2007. | |
3 | +// Copyright Takeshi Mouri 2007, 2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -38,7 +38,6 @@ | ||
38 | 38 | } |
39 | 39 | |
40 | 40 | std::setlocale(LC_ALL, ""); |
41 | - fs::path::default_name_check(fs::no_check); | |
42 | 41 | |
43 | 42 | ar::iso_file_source iso(argv[1]); |
44 | 43 |
@@ -80,7 +79,7 @@ | ||
80 | 79 | io::copy( |
81 | 80 | iso, |
82 | 81 | io_ex::file_sink( |
83 | - head.path.native_file_string(), std::ios_base::binary) | |
82 | + head.path.file_string(), std::ios_base::binary) | |
84 | 83 | ); |
85 | 84 | } |
86 | 85 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // list_zip.cpp: show the file list in the ZIP file |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -29,7 +29,6 @@ | ||
29 | 29 | } |
30 | 30 | |
31 | 31 | std::setlocale(LC_ALL, ""); |
32 | - fs::path::default_name_check(fs::no_check); | |
33 | 32 | |
34 | 33 | // file_descriptor_source supports 64bit offset |
35 | 34 | ar::basic_zip_file_source<io_ex::file_descriptor_source> |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // glob_test.cpp: test case for glob.hpp |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2007. | |
3 | +// Copyright Takeshi Mouri 2007, 2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -23,7 +23,7 @@ | ||
23 | 23 | bjam::string_list result; |
24 | 24 | std::string expect; |
25 | 25 | |
26 | - fs::path work = fs::current_path(); | |
26 | + fs::path work = fs::current_path<fs::path>(); | |
27 | 27 | |
28 | 28 | #if defined(BOOST_WINDOWS) |
29 | 29 | expect = hamigaki_root + "\\Jamfile.v2"; |
@@ -31,12 +31,12 @@ | ||
31 | 31 | expect = hamigaki_root + "/Jamfile.v2"; |
32 | 32 | #endif |
33 | 33 | |
34 | - result = bjam::glob(work.native_directory_string(), hamigaki_root, "J*.v2"); | |
34 | + result = bjam::glob(work.directory_string(), hamigaki_root, "J*.v2"); | |
35 | 35 | BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end()); |
36 | 36 | |
37 | 37 | |
38 | 38 | result = bjam::glob( |
39 | - work.native_directory_string(), hamigaki_root, "j*.v2", true); | |
39 | + work.directory_string(), hamigaki_root, "j*.v2", true); | |
40 | 40 | BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end()); |
41 | 41 | |
42 | 42 |
@@ -45,7 +45,7 @@ | ||
45 | 45 | #else |
46 | 46 | expect = "././Jamfile.v2"; |
47 | 47 | #endif |
48 | - result = bjam::glob(work.native_directory_string(), "./.", "J*.v2"); | |
48 | + result = bjam::glob(work.directory_string(), "./.", "J*.v2"); | |
49 | 49 | BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end()); |
50 | 50 | } |
51 | 51 |
@@ -55,7 +55,7 @@ | ||
55 | 55 | std::string pattern; |
56 | 56 | std::string expect; |
57 | 57 | |
58 | - fs::path work = fs::current_path(); | |
58 | + fs::path work = fs::current_path<fs::path>(); | |
59 | 59 | |
60 | 60 | pattern = hamigaki_root + "/libs/*/build/J*.v2"; |
61 | 61 | #if defined(BOOST_WINDOWS) |
@@ -63,7 +63,7 @@ | ||
63 | 63 | #else |
64 | 64 | expect = hamigaki_root + "/libs/bjam/build/Jamfile.v2"; |
65 | 65 | #endif |
66 | - result = bjam::glob_recursive(work.native_directory_string(), pattern); | |
66 | + result = bjam::glob_recursive(work.directory_string(), pattern); | |
67 | 67 | BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end()); |
68 | 68 | |
69 | 69 |
@@ -73,7 +73,7 @@ | ||
73 | 73 | #else |
74 | 74 | expect = "././Jamfile.v2"; |
75 | 75 | #endif |
76 | - result = bjam::glob_recursive(work.native_directory_string(), pattern); | |
76 | + result = bjam::glob_recursive(work.directory_string(), pattern); | |
77 | 77 | BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end()); |
78 | 78 | } |
79 | 79 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // bjam_test.cpp: test case for bjam_grammar |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2007. | |
3 | +// Copyright Takeshi Mouri 2007, 2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -457,7 +457,7 @@ | ||
457 | 457 | |
458 | 458 | std::string src; |
459 | 459 | src += "include "; |
460 | - src += algo::replace_all_copy(ph.native_file_string(), "\\", "\\\\"); | |
460 | + src += algo::replace_all_copy(ph.file_string(), "\\", "\\\\"); | |
461 | 461 | src += " ;"; |
462 | 462 | |
463 | 463 | BOOST_CHECK(eval(ctx, src).empty()); |
@@ -469,7 +469,7 @@ | ||
469 | 469 | |
470 | 470 | fs::path ph(hamigaki_root, fs::native); |
471 | 471 | ph /= "libs/bjam/test/back_trace_test.jam"; |
472 | - std::string filename = ph.native_file_string(); | |
472 | + std::string filename = ph.file_string(); | |
473 | 473 | |
474 | 474 | std::string src; |
475 | 475 | src += "include "; |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // search.cpp: search the target file |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2007. | |
3 | +// Copyright Takeshi Mouri 2007, 2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -80,7 +80,7 @@ | ||
80 | 80 | compo.root.clear(); |
81 | 81 | fs::path ph(make_path(compo), fs::native); |
82 | 82 | fs::path work(ctx.working_directory(), fs::native); |
83 | - filename = fs::complete(ph, work).native_file_string(); | |
83 | + filename = fs::complete(ph, work).file_string(); | |
84 | 84 | } |
85 | 85 | |
86 | 86 | call_bind_rule(ctx, name, filename); |
@@ -159,7 +159,7 @@ | ||
159 | 159 | } // namespace |
160 | 160 | |
161 | 161 | context::context() |
162 | - : working_directory_(fs::current_path().native_directory_string()) | |
162 | + : working_directory_(fs::current_path<fs::path>().directory_string()) | |
163 | 163 | , os_(&std::cout) |
164 | 164 | { |
165 | 165 | frames_.push_back(frame(root_module_)); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // glob.cpp: glob for bjam |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2007. | |
3 | +// Copyright Takeshi Mouri 2007, 2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -97,7 +97,7 @@ | ||
97 | 97 | const std::string& ph = make_path(compo); |
98 | 98 | |
99 | 99 | string_list tmp; |
100 | - if (fs::exists(fs::complete(fs::path(ph, fs::no_check), work))) | |
100 | + if (fs::exists(fs::complete(ph, work))) | |
101 | 101 | tmp.push_back(ph); |
102 | 102 | return tmp; |
103 | 103 | } |
@@ -114,7 +114,7 @@ | ||
114 | 114 | compo.base = ptn; |
115 | 115 | |
116 | 116 | const std::string& new_dir = make_path(compo); |
117 | - fs::path ph(new_dir, fs::no_check); | |
117 | + fs::path ph(new_dir); | |
118 | 118 | ph = fs::complete(ph, work); |
119 | 119 | |
120 | 120 | if (fs::is_directory(ph)) |
@@ -91,8 +91,6 @@ | ||
91 | 91 | |
92 | 92 | inline tar::header read_tar_header(const char* block) |
93 | 93 | { |
94 | - using namespace boost::filesystem; | |
95 | - | |
96 | 94 | tar::raw_header raw; |
97 | 95 | hamigaki::binary_read(block, raw); |
98 | 96 |
@@ -102,8 +100,8 @@ | ||
102 | 100 | if (!detail::is_valid(raw.uname) || !detail::is_valid(raw.gname)) |
103 | 101 | throw BOOST_IOSTREAMS_FAILURE("invalid tar header"); |
104 | 102 | |
105 | - const path name(detail::read_string(raw.name), no_check); | |
106 | - const path prefix(detail::read_string(raw.prefix), no_check); | |
103 | + const boost::filesystem::path name(detail::read_string(raw.name)); | |
104 | + const boost::filesystem::path prefix(detail::read_string(raw.prefix)); | |
107 | 105 | |
108 | 106 | tar::header head; |
109 | 107 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // sl_components_parser.hpp: IEEE P1282 "SL" components parser |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2007. | |
3 | +// Copyright Takeshi Mouri 2007, 2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -66,8 +66,6 @@ | ||
66 | 66 | |
67 | 67 | std::size_t parse_components(const char* s, std::size_t size) |
68 | 68 | { |
69 | - using boost::filesystem::no_check; | |
70 | - | |
71 | 69 | if (size < 2) |
72 | 70 | { |
73 | 71 | bad_ = true; |
@@ -122,7 +120,7 @@ | ||
122 | 120 | |
123 | 121 | if ((flags & continue_) == 0) |
124 | 122 | { |
125 | - ph_ /= boost::filesystem::path(leaf_, no_check); | |
123 | + ph_ /= leaf_; | |
126 | 124 | leaf_.clear(); |
127 | 125 | } |
128 | 126 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // raw_cpio_file_sink_impl.hpp: raw cpio file sink implementation |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -269,12 +269,10 @@ | ||
269 | 269 | |
270 | 270 | void close_archive() |
271 | 271 | { |
272 | - using namespace boost::filesystem; | |
273 | - | |
274 | 272 | cpio::header head; |
275 | 273 | head.format = format_; |
276 | 274 | head.permissions = 0; |
277 | - head.path = path("TRAILER!!!", no_check); | |
275 | + head.path = "TRAILER!!!"; | |
278 | 276 | create_entry(head); |
279 | 277 | |
280 | 278 | boost::iostreams::close(sink_, BOOST_IOS::out); |
@@ -94,8 +94,6 @@ | ||
94 | 94 | |
95 | 95 | void create_entry(const tar::header& head) |
96 | 96 | { |
97 | - using namespace boost::filesystem; | |
98 | - | |
99 | 97 | tar::header local = head; |
100 | 98 | |
101 | 99 | std::string name = head.path.string(); |
@@ -118,7 +116,7 @@ | ||
118 | 116 | ex += detail::make_ex_header_recoed("path", long_name); |
119 | 117 | |
120 | 118 | long_name.resize(tar::raw_header::name_size); |
121 | - local.path = path(long_name, no_check); | |
119 | + local.path = long_name; | |
122 | 120 | } |
123 | 121 | |
124 | 122 | if ((head.uid < 0) || (head.uid > tar::raw_header::max_uid)) |
@@ -171,7 +169,7 @@ | ||
171 | 169 | ex += detail::make_ex_header_recoed("linkpath", long_link); |
172 | 170 | |
173 | 171 | long_link.resize(tar::raw_header::name_size); |
174 | - local.link_path = path(long_link, no_check); | |
172 | + local.link_path = long_link; | |
175 | 173 | } |
176 | 174 | |
177 | 175 | if (detail::is_non_ascii(head.user_name)) |
@@ -215,7 +213,7 @@ | ||
215 | 213 | ustar_.close(); |
216 | 214 | |
217 | 215 | long_name.resize(tar::raw_header::name_size); |
218 | - local.path = path(long_name, no_check); | |
216 | + local.path = long_name; | |
219 | 217 | } |
220 | 218 | |
221 | 219 | if (long_link.size() > tar::raw_header::name_size) |
@@ -232,7 +230,7 @@ | ||
232 | 230 | ustar_.close(); |
233 | 231 | |
234 | 232 | long_link.resize(tar::raw_header::name_size); |
235 | - local.link_path = path(long_link, no_check); | |
233 | + local.link_path = long_link; | |
236 | 234 | } |
237 | 235 | } |
238 | 236 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // raw_cpio_file_source_impl.hpp: raw cpio file source implementation |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -132,14 +132,12 @@ | ||
132 | 132 | |
133 | 133 | bool next_entry() |
134 | 134 | { |
135 | - using namespace boost::filesystem; | |
136 | - | |
137 | 135 | if (boost::uint32_t rest = header_.file_size - pos_) |
138 | 136 | iostreams::skip(src_, rest); |
139 | 137 | pos_ = 0; |
140 | 138 | |
141 | 139 | header_ = read_header(); |
142 | - if (header_.path == path("TRAILER!!!", no_check)) | |
140 | + if (header_.path == "TRAILER!!!") | |
143 | 141 | return false; |
144 | 142 | else if (header_.is_symlink()) |
145 | 143 | { |
@@ -146,7 +144,7 @@ | ||
146 | 144 | boost::scoped_array<char> buf(new char[header_.file_size+1]); |
147 | 145 | this->read(buf.get(), header_.file_size); |
148 | 146 | buf[header_.file_size] = '\0'; |
149 | - header_.link_path = path(buf.get(), no_check); | |
147 | + header_.link_path = buf.get(); | |
150 | 148 | |
151 | 149 | pos_ = 0; |
152 | 150 | header_.file_size = 0; |
@@ -179,8 +177,6 @@ | ||
179 | 177 | |
180 | 178 | cpio::header read_header() |
181 | 179 | { |
182 | - using namespace boost::filesystem; | |
183 | - | |
184 | 180 | cpio::header head; |
185 | 181 | std::size_t name_size = 0; |
186 | 182 |
@@ -227,7 +223,7 @@ | ||
227 | 223 | |
228 | 224 | boost::scoped_array<char> buf(new char[name_size]); |
229 | 225 | iostreams::blocking_read(src_, buf.get(), name_size); |
230 | - head.path = path(buf.get(), no_check); | |
226 | + head.path = buf.get(); | |
231 | 227 | |
232 | 228 | return head; |
233 | 229 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // tar_file_source_impl.hpp: POSIX tar file source implementation |
2 | 2 | |
3 | -// Copyright Takeshi Mouri 2006, 2007. | |
3 | +// Copyright Takeshi Mouri 2006-2008. | |
4 | 4 | // Distributed under the Boost Software License, Version 1.0. |
5 | 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
6 | 6 | // http://www.boost.org/LICENSE_1_0.txt) |
@@ -175,8 +175,6 @@ | ||
175 | 175 | |
176 | 176 | boost::filesystem::path read_long_link() |
177 | 177 | { |
178 | - using namespace boost::filesystem; | |
179 | - | |
180 | 178 | std::string buf; |
181 | 179 | |
182 | 180 | boost::iostreams::copy( |
@@ -186,13 +184,11 @@ | ||
186 | 184 | if (!buf.empty() && (*(buf.rbegin()) == '\0')) |
187 | 185 | buf.resize(buf.size()-1); |
188 | 186 | |
189 | - return path(buf, no_check); | |
187 | + return buf; | |
190 | 188 | } |
191 | 189 | |
192 | 190 | void read_extended_header(tar_ex_header& ext) |
193 | 191 | { |
194 | - using namespace boost::filesystem; | |
195 | - | |
196 | 192 | boost::iostreams::stream< |
197 | 193 | boost::reference_wrapper<ustar_type> |
198 | 194 | > is(boost::ref(ustar_)); |
@@ -224,7 +220,7 @@ | ||
224 | 220 | const char* end = beg + (size - 1); |
225 | 221 | |
226 | 222 | if (key == "path") |
227 | - ext.path = path(beg, no_check); | |
223 | + ext.path = beg; | |
228 | 224 | else if (key == "uid") |
229 | 225 | ext.uid = hamigaki::from_dec<boost::intmax_t>(beg, end); |
230 | 226 | else if (key == "gid") |
@@ -238,7 +234,7 @@ | ||
238 | 234 | else if (key == "ctime") |
239 | 235 | ext.change_time = detail::to_timestamp(beg, end); |
240 | 236 | else if (key == "linkpath") |
241 | - ext.link_path = path(beg, no_check); | |
237 | + ext.link_path = beg; | |
242 | 238 | else if (key == "uname") |
243 | 239 | ext.user_name = beg; |
244 | 240 | else if (key == "gname") |