|
Boost Users : |
From: me22 (me22.ca_at_[hidden])
Date: 2007-04-17 19:04:55
On 4/17/07, Graham Reitz <graham.cpp_at_[hidden]> wrote:
> Why does the following path initialization throw this?
>
> "boost::filesystem::path: invalid name "c:" in path:
> "c:/dev/Sandbox/file_system/
> textfile1.txt"
>
It comes from the name checker, as Rush Manbert mentioned.
> // Is this not an appropriate method to initialize path objects?
> path text_file(current_path().string() +
> "/textfile1.txt");
You might consider path text_file = complete("./textfile1.txt"); (or
http://boost.org/libs/filesystem/doc/operations.htm#system_complete if
you really need current_path), which may avoid the need to futz with
the name checkers.
~ Scott McMurray
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net