|
Boost Users : |
From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2007-03-12 08:49:12
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Timo
Sent: Monday, March 12, 2007 6:41 AM
To: boost-users_at_[hidden]
Subject: [Boost-users] Problem with fs::path initialization in windows
I have a little problem with initialization of boost filesystem path.
I'm
working on Cygwin in Windows XP.
But when I try to use a path of my own, say:
fs::path full_path( "C:\\cygwin\\boost" );
I get thrown with an exception. Same deal with the rest of the
combinations
I can think of:
C:/cygwin/boost
c:/cygwin/boost.
c/cygwin and
/cygwin don't throw but the paths are not found.
So how do initialize the fs::path with a Windows type of directory path?
[Nat] Have you tried something like:
fs::path full_path("some string", fs::no_check);
?
I've found that the best policy with boost::filesystem is to explicitly
disable its name check on every instantiation. In fact I've introduced a
local subclass with a constructor accepting a path string; the
constructor simply passes the string to the base-class constructor along
with boost::filesystem::no_check.
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