Boost logo

Boost Users :

From: Timo (timo_lampinen_at_[hidden])
Date: 2007-03-12 10:13:42


fs::native throws an exception. But fs::no_check works. Just wondering if
this is a "feature" that the boost developers are aware of.

Timo

"Heiko Fechner" <fechner_at_[hidden]> wrote in message
news:45F55FE4.6070505_at_ibk.arch.tu-dresden.de...
> Hi,
>
> try this
> fs::path full_path( "C:\\cygwin\\boost", fs::native );
>
> Nat Goodspeed schrieb:
>> -----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:
>> c
>> 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 mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>

--------------------------------------------------------------------------------

> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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