| 461 | } |
| 462 | |
| 463 | void DiskLocal::removeFileIfExists(const String & path) |
| 464 | { |
| 465 | auto fs_path = fs::path(disk_path) / path; |
| 466 | if (0 != unlink(fs_path.c_str())) |
| 467 | { |
| 468 | if (errno != ENOENT) |
| 469 | ErrnoException::throwFromPath(ErrorCodes::CANNOT_UNLINK, fs_path, "Cannot unlink file {}", fs_path); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | void DiskLocal::removeDirectory(const String & path) |
| 474 | { |
no test coverage detected