3 #include "file_system.hpp"
10 std::string dirname(const std::string& filename)
12 std::string::size_type p = filename.find_last_of('/');
13 if(p == std::string::npos)
16 return filename.substr(0, p+1);
19 std::string basename(const std::string& filename)
21 std::string::size_type p = filename.find_last_of('/');
22 if(p == std::string::npos)
25 return filename.substr(p, filename.size()-p);