| 18 | #include <fcntl.h> |
| 19 | |
| 20 | void |
| 21 | RenameFile(Path oldpath, Path newpath) |
| 22 | { |
| 23 | #ifdef _WIN32 |
| 24 | if (!MoveFileEx(oldpath.c_str(), newpath.c_str(), |
| 25 | MOVEFILE_REPLACE_EXISTING)) |
| 26 | throw MakeLastError("Failed to rename file"); |
| 27 | #else |
| 28 | if (rename(oldpath.c_str(), newpath.c_str()) < 0) |
| 29 | throw MakeErrno("Failed to rename file"); |
| 30 | #endif |
| 31 | } |
| 32 | |
| 33 | AllocatedPath |
| 34 | ReadLink(Path path) noexcept |
no outgoing calls
no test coverage detected