| 808 | } |
| 809 | |
| 810 | bool __remove(const path& p, error_code* ec) { |
| 811 | ErrorHandler<bool> err("remove", ec, &p); |
| 812 | if (detail::remove(p.c_str()) == -1) { |
| 813 | error_code mec = detail::get_last_error(); |
| 814 | if (mec != errc::no_such_file_or_directory) |
| 815 | err.report(mec); |
| 816 | return false; |
| 817 | } |
| 818 | return true; |
| 819 | } |
| 820 | |
| 821 | // We currently have two implementations of `__remove_all`. The first one is general and |
| 822 | // used on platforms where we don't have access to the `openat()` family of POSIX functions. |
no test coverage detected