| 268 | } |
| 269 | |
| 270 | bool |
| 271 | IsFile(std::string const& path) |
| 272 | { |
| 273 | US_STAT s; |
| 274 | errno = 0; |
| 275 | if (us_stat(path.c_str(), &s)) |
| 276 | { |
| 277 | if (not_found_c_error(errno)) |
| 278 | { |
| 279 | return false; |
| 280 | } |
| 281 | else |
| 282 | { |
| 283 | throw std::invalid_argument(GetLastCErrorStr()); |
| 284 | } |
| 285 | } |
| 286 | return S_ISREG(s.st_mode); |
| 287 | } |
| 288 | |
| 289 | bool |
| 290 | IsRelative(std::string const& path) |