Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BungoMan85

parsing changes to a directory name

This topic is 5397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

whats the best way to parse changes to a directory name? lets say i had a string like so std::string directory="C:\\"; and i had a function that would take a working directory and a destination directory like so changedirectory(directory,"windows"); and then directory would = C:\windows however if for example i then did changedirectory(directory,"..\\documents and settings"); then directory would = C:\documents and settings, this being able to support as many .. as needed so i can move relatively up any number of folders (if possible) and finaly if i did changedirectory(directory,"C:\\program files"); then directory would = C:\program files basicly i need to write a function that changes directories much like dos did. with support for both absolute and relative (in all forms) path changing. i can kinda see how this is done, but i dont wanna reinvent the wheel if i dont have to. and if someone knows a fast, efficient, and working method id be very greatful to see how this is done. Bungo!

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!