| 48 | } |
| 49 | |
| 50 | void makedirname(std::string& path) |
| 51 | // Strip a path down into just a directory name, by removing everything after |
| 52 | // the last / (and removing the last /). If there is no / then this will leave |
| 53 | // just the empty string. |
| 54 | { |
| 55 | size_t pos = path.find_last_of('/'); |
| 56 | if(pos != std::string::npos) { |
| 57 | path.resize(pos); |
| 58 | } else { |
| 59 | path.clear(); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void listdir_internal(std::list<std::string>& output_list, |
| 64 | const std::string& dirname, bool recursive, const std::string &prefix) |
no test coverage detected