| 1518 | } |
| 1519 | |
| 1520 | BOOST_FILESYSTEM_DECL |
| 1521 | bool remove(const path& p, error_code* ec) |
| 1522 | { |
| 1523 | error_code tmp_ec; |
| 1524 | file_type type = query_file_type(p, &tmp_ec); |
| 1525 | if (error(type == status_error, tmp_ec, p, ec, |
| 1526 | "boost::filesystem::remove")) |
| 1527 | return false; |
| 1528 | |
| 1529 | // Since POSIX remove() is specified to work with either files or directories, in a |
| 1530 | // perfect world it could just be called. But some important real-world operating |
| 1531 | // systems (Windows, Mac OS X, for example) don't implement the POSIX spec. So |
| 1532 | // remove_file_or_directory() is always called to kep it simple. |
| 1533 | return remove_file_or_directory(p, type, ec); |
| 1534 | } |
| 1535 | |
| 1536 | BOOST_FILESYSTEM_DECL |
| 1537 | boost::uintmax_t remove_all(const path& p, error_code* ec) |