Boost logo

Boost Users :

From: Nathan Pierluissi (npierluissi_at_[hidden])
Date: 2007-02-03 23:48:21


That solved it! Thanks so much Nat.

Nat Goodspeed <ngoodspeed_at_[hidden]> wrote: ________________________________________
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Nathan Pierluissi
Sent: Saturday, February 03, 2007 5:53 PM
To: boost-users_at_[hidden]
Subject: [Boost-users] [Filesystem] Folders with spaces in the name

I am having trouble using the /= operator to open folders with spaces in the name, ex. "My Documents" or "Program Files". Here is an example code:
 
path full_path("c:\");
string Fname="Program Files";
full_path/=Fname;
 
It works for any Fname (folder name) that doesn't have a space. Let me know if you need more information. Thanks in advance.

[Nat] You didn't explain the nature of your 'trouble,' but if you're encountering exceptions, it's probably the default boost::filesystem::path syntax checker. Try explicitly disabling that rather than letting operator/= implicitly convert your string to boost::filesystem::path with the default checker, e.g. (neither compiled nor tested):

full_path /= path(Fname, no_check);
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

 
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers 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