| 622 | } |
| 623 | |
| 624 | Status GetFileSize(const std::string& filename, uint64_t* size) override { |
| 625 | struct ::stat file_stat; |
| 626 | if (::stat(filename.c_str(), &file_stat) != 0) { |
| 627 | *size = 0; |
| 628 | return PosixError(filename, errno); |
| 629 | } |
| 630 | *size = file_stat.st_size; |
| 631 | return Status::OK(); |
| 632 | } |
| 633 | |
| 634 | Status RenameFile(const std::string& from, const std::string& to) override { |
| 635 | if (std::rename(from.c_str(), to.c_str()) != 0) { |