removed fs::native
@@ -1,6 +1,6 @@ | ||
1 | 1 | // show_status.cpp: show the status of the 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) |
@@ -44,7 +44,7 @@ | ||
44 | 44 | return 1; |
45 | 45 | } |
46 | 46 | |
47 | - fs::path ph(argv[1], fs::native); | |
47 | + fs::path ph(argv[1]); | |
48 | 48 | const fs_ex::file_status& s = fs_ex::status(ph); |
49 | 49 | if (s.type() == fs_ex::file_not_found) |
50 | 50 | throw std::runtime_error("file not found"); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // read_link.cpp: show the target path of the symbolic link |
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) |
@@ -24,7 +24,7 @@ | ||
24 | 24 | return 1; |
25 | 25 | } |
26 | 26 | |
27 | - fs::path ph(argv[1], fs::native); | |
27 | + fs::path ph(argv[1]); | |
28 | 28 | std::cout << fs_ex::symlink_target(ph).string() << std::endl; |
29 | 29 | |
30 | 30 | return 0; |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // shortcut.cpp: create shortcut |
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) |
@@ -47,8 +47,8 @@ | ||
47 | 47 | |
48 | 48 | com_library using_com; |
49 | 49 | |
50 | - fs::path target(argv[1], fs::native); | |
51 | - fs::path ph(argv[2], fs::native); | |
50 | + fs::path target(argv[1]); | |
51 | + fs::path ph(argv[2]); | |
52 | 52 | if (extension(ph) != ".lnk") |
53 | 53 | ph = ph.branch_path() / (ph.leaf() + ".lnk"); |
54 | 54 | fs_ex::create_shell_link(target, ph); |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // link.cpp: create soft/hard links |
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,14 +29,14 @@ | ||
29 | 29 | |
30 | 30 | if (argc == 3) |
31 | 31 | { |
32 | - fs::path target(argv[1], fs::native); | |
33 | - fs::path ph(argv[2], fs::native); | |
32 | + fs::path target(argv[1]); | |
33 | + fs::path ph(argv[2]); | |
34 | 34 | fs_ex::create_hard_link(target, ph); |
35 | 35 | } |
36 | 36 | else |
37 | 37 | { |
38 | - fs::path target(argv[2], fs::native); | |
39 | - fs::path ph(argv[3], fs::native); | |
38 | + fs::path target(argv[2]); | |
39 | + fs::path ph(argv[3]); | |
40 | 40 | fs_ex::create_symlink(target, ph); |
41 | 41 | } |
42 | 42 |
@@ -43,7 +43,7 @@ | ||
43 | 43 | for (int i = 2; i < argc; ++i) |
44 | 44 | { |
45 | 45 | ar::zip::header head; |
46 | - head.path = fs::path(argv[i], fs::native); | |
46 | + head.path = fs::path(argv[i]); | |
47 | 47 | |
48 | 48 | const fs_ex::file_status& s = fs_ex::symlink_status(head.path); |
49 | 49 |
@@ -47,7 +47,7 @@ | ||
47 | 47 | for (int i = 2; i < argc; ++i) |
48 | 48 | { |
49 | 49 | ar::lha::header head; |
50 | - head.path = fs::path(argv[i], fs::native); | |
50 | + head.path = fs::path(argv[i]); | |
51 | 51 | |
52 | 52 | const fs_ex::file_status& s = fs_ex::symlink_status(head.path); |
53 | 53 |
@@ -273,7 +273,7 @@ | ||
273 | 273 | |
274 | 274 | std::auto_ptr<extractor_base> ext_ptr; |
275 | 275 | const std::string filename(argv[1]); |
276 | - const fs::path ph(filename, fs::native); | |
276 | + const fs::path ph(filename); | |
277 | 277 | if (!fs::exists(ph)) |
278 | 278 | throw std::runtime_error("file not found"); |
279 | 279 |
@@ -331,7 +331,7 @@ | ||
331 | 331 | "gzip cannot contain two files or more"); |
332 | 332 | } |
333 | 333 | |
334 | - fs::path ph(argv[2], fs::native); | |
334 | + fs::path ph(argv[2]); | |
335 | 335 | if (fs::is_directory(ph)) |
336 | 336 | throw std::runtime_error("gzip cannot compress a directory"); |
337 | 337 |
@@ -356,7 +356,7 @@ | ||
356 | 356 | "bzip2 cannot contain two files or more"); |
357 | 357 | } |
358 | 358 | |
359 | - fs::path ph(argv[2], fs::native); | |
359 | + fs::path ph(argv[2]); | |
360 | 360 | if (fs::is_directory(ph)) |
361 | 361 | throw std::runtime_error("bzip2 cannot compress a directory"); |
362 | 362 |
@@ -375,7 +375,7 @@ | ||
375 | 375 | for (int i = 2; i < argc; ++i) |
376 | 376 | { |
377 | 377 | entry e; |
378 | - e.path = fs::path(argv[i], fs::native); | |
378 | + e.path = fs::path(argv[i]); | |
379 | 379 | |
380 | 380 | const fs_ex::file_status& s = fs_ex::symlink_status(e.path); |
381 | 381 |
@@ -53,11 +53,11 @@ | ||
53 | 53 | |
54 | 54 | std::setlocale(LC_ALL, ""); |
55 | 55 | |
56 | - fs::path zip_name(argv[1], fs::native); | |
56 | + fs::path zip_name(argv[1]); | |
57 | 57 | const fs::path& bak_name = change_extension(zip_name, ".bak"); |
58 | 58 | rename(zip_name, bak_name); |
59 | 59 | |
60 | - fs::path del_name(argv[2], fs::native); | |
60 | + fs::path del_name(argv[2]); | |
61 | 61 | |
62 | 62 | { |
63 | 63 | ar::raw_zip_file_source src(bak_name.file_string()); |
@@ -50,7 +50,7 @@ | ||
50 | 50 | for (int i = 2; i < argc; ++i) |
51 | 51 | { |
52 | 52 | ar::tar::header head; |
53 | - head.path = fs::path(argv[i], fs::native); | |
53 | + head.path = fs::path(argv[i]); | |
54 | 54 | |
55 | 55 | const fs_ex::file_status& s = fs_ex::symlink_status(head.path); |
56 | 56 |
@@ -53,11 +53,11 @@ | ||
53 | 53 | |
54 | 54 | std::setlocale(LC_ALL, ""); |
55 | 55 | |
56 | - fs::path lzh_name(argv[1], fs::native); | |
56 | + fs::path lzh_name(argv[1]); | |
57 | 57 | const fs::path& bak_name = change_extension(lzh_name, ".bak"); |
58 | 58 | rename(lzh_name, bak_name); |
59 | 59 | |
60 | - fs::path del_name(argv[2], fs::native); | |
60 | + fs::path del_name(argv[2]); | |
61 | 61 | |
62 | 62 | { |
63 | 63 | ar::raw_lzh_file_source src(bak_name.file_string()); |
@@ -48,7 +48,7 @@ | ||
48 | 48 | for (int i = 2; i < argc; ++i) |
49 | 49 | { |
50 | 50 | ar::iso::header head; |
51 | - head.path = fs::path(argv[i], fs::native); | |
51 | + head.path = fs::path(argv[i]); | |
52 | 52 | |
53 | 53 | const fs_ex::file_status& s = fs_ex::status(head.path); |
54 | 54 |
@@ -58,7 +58,7 @@ | ||
58 | 58 | for (int i = 2; i < argc; ++i) |
59 | 59 | { |
60 | 60 | ar::lha::header head; |
61 | - head.path = fs::path(argv[i], fs::native); | |
61 | + head.path = fs::path(argv[i]); | |
62 | 62 | |
63 | 63 | const fs_ex::file_status& s = fs_ex::symlink_status(head.path); |
64 | 64 |
@@ -452,7 +452,7 @@ | ||
452 | 452 | { |
453 | 453 | bjam::context ctx; |
454 | 454 | |
455 | - fs::path ph(hamigaki_root, fs::native); | |
455 | + fs::path ph(hamigaki_root); | |
456 | 456 | ph /= "libs/bjam/test/include_test.jam"; |
457 | 457 | |
458 | 458 | std::string src; |
@@ -467,7 +467,7 @@ | ||
467 | 467 | { |
468 | 468 | bjam::context ctx; |
469 | 469 | |
470 | - fs::path ph(hamigaki_root, fs::native); | |
470 | + fs::path ph(hamigaki_root); | |
471 | 471 | ph /= "libs/bjam/test/back_trace_test.jam"; |
472 | 472 | std::string filename = ph.file_string(); |
473 | 473 |
@@ -67,7 +67,7 @@ | ||
67 | 67 | compo.root = search_list[i]; |
68 | 68 | filename = make_path(compo); |
69 | 69 | |
70 | - if (fs::exists(fs::path(filename, fs::native))) | |
70 | + if (fs::exists(fs::path(filename))) | |
71 | 71 | { |
72 | 72 | found = true; |
73 | 73 | break; |
@@ -78,8 +78,8 @@ | ||
78 | 78 | if (!found) |
79 | 79 | { |
80 | 80 | compo.root.clear(); |
81 | - fs::path ph(make_path(compo), fs::native); | |
82 | - fs::path work(ctx.working_directory(), fs::native); | |
81 | + fs::path ph(make_path(compo)); | |
82 | + fs::path work(ctx.working_directory()); | |
83 | 83 | filename = fs::complete(ph, work).file_string(); |
84 | 84 | } |
85 | 85 |
@@ -590,8 +590,8 @@ | ||
590 | 590 | |
591 | 591 | const std::string& file = args[0][0]; |
592 | 592 | |
593 | - fs::path ph(file, fs::native); | |
594 | - fs::path work(ctx.working_directory(), fs::native); | |
593 | + fs::path ph(file); | |
594 | + fs::path work(ctx.working_directory()); | |
595 | 595 | ph = fs::complete(ph, work); |
596 | 596 | if (fs::is_regular(ph)) |
597 | 597 | return string_list(std::string("true")); |
@@ -39,7 +39,7 @@ | ||
39 | 39 | |
40 | 40 | string_list result; |
41 | 41 | |
42 | - fs::path ph(dir, fs::native); | |
42 | + fs::path ph(dir); | |
43 | 43 | ph = fs::complete(ph, work); |
44 | 44 | |
45 | 45 | if (!is_directory(ph)) |
@@ -141,13 +141,13 @@ | ||
141 | 141 | const std::string& pattern, bool case_insensitive) |
142 | 142 | { |
143 | 143 | return glob_impl( |
144 | - fs::path(work, fs::native), dir, pattern, case_insensitive, false); | |
144 | + fs::path(work), dir, pattern, case_insensitive, false); | |
145 | 145 | } |
146 | 146 | |
147 | 147 | HAMIGAKI_BJAM_DECL string_list |
148 | 148 | glob_recursive(const std::string& work, const std::string& pattern) |
149 | 149 | { |
150 | - fs::path work_ph(work, fs::native); | |
150 | + fs::path work_ph(work); | |
151 | 151 | |
152 | 152 | if ((pattern.size() >= 3) && (pattern[1] == ':')) |
153 | 153 | { |
@@ -1,6 +1,6 @@ | ||
1 | 1 | // path.cpp: bjam path module |
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) |
@@ -31,8 +31,8 @@ | ||
31 | 31 | |
32 | 32 | const std::string& location = args[0][0]; |
33 | 33 | |
34 | - fs::path ph(location, fs::native); | |
35 | - fs::path work(ctx.working_directory(), fs::native); | |
34 | + fs::path ph(location); | |
35 | + fs::path work(ctx.working_directory()); | |
36 | 36 | ph = fs::complete(ph, work); |
37 | 37 | if (fs::exists(ph)) |
38 | 38 | return string_list(std::string("true")); |