Last active
April 22, 2020 04:39
-
-
Save moebiussurfing/4f7ecdac5aa65c894771e26bdc2abc76 to your computer and use it in GitHub Desktop.
openFrameworks - file path handling with boost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//split string path using boost | |
//https://stackoverflow.com/questions/10099206/howto-parse-a-path-to-a-vector-using-c | |
//boost::filesystem::path p1("/usr/local/bin"); | |
boost::filesystem::path p1(videoFilePath.get()); | |
//boost::filesystem::path p2("c:\\"); | |
std::cout << p1.filename() << std::endl; // prints "bin" | |
std::cout << p1.parent_path() << std::endl; // prints "/usr/local" | |
videoName = ofToString(p1.filename()); | |
filename: "NightmoVES4.mov" | |
parent_path: "C:\_DATA" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment