Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-21-2008, 12:06 AM   PM User | #1
meirab
New to the CF scene

 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
meirab is an unknown quantity at this point
moving between folders (boost::filesystem)

Hello all

I am trying to "move" from folder to folder. (like: set def ... or cd ..)
i need a short program (c++) using boost::filesystem to do it (if possible)

how can i do it if it's not possible using: boost::filesystem

thanks
meirab is offline   Reply With Quote
Old 10-21-2008, 05:13 AM   PM User | #2
ralph l mayo
Regular Coder

 
ralph l mayo's Avatar
 
Join Date: Nov 2005
Posts: 951
Thanks: 1
Thanked 31 Times in 29 Posts
ralph l mayo is on a distinguished road
boost::filesystem doesn't offer this, it just expects you to pass a path object for the directory you want to use (but doesn't actually change the working directory to it).

You'll have to go to the native API.

Windows has SetCurrentDirectory from Windows.h.

Posix (everything else) has chdir() from <unistd.h>
ralph l mayo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:13 PM.


Advertisement
Log in to turn off these ads.