| 200 | } |
| 201 | |
| 202 | bool isDirectory(const std::string& file) { |
| 203 | struct stat st; |
| 204 | int rc; |
| 205 | |
| 206 | rc = stat(file.c_str(), &st); |
| 207 | if (rc == -1) |
| 208 | throw Error("Error stat(\"" + file + "\")"); |
| 209 | |
| 210 | if (S_ISDIR(st.st_mode)) |
| 211 | return true; |
| 212 | else |
| 213 | return false; |
| 214 | } |
| 215 | |
| 216 | void make_dirs(const std::string& dirname) |
| 217 | // Ensure that a directory given by absolute path dirname exists |
no test coverage detected