| 293 | } |
| 294 | |
| 295 | Status PosixFileSystem::GetFileSize(const string& fname, uint64* size) { |
| 296 | Status s; |
| 297 | struct stat sbuf; |
| 298 | if (stat(TranslateName(fname).c_str(), &sbuf) != 0) { |
| 299 | *size = 0; |
| 300 | s = IOError(fname, errno); |
| 301 | } else { |
| 302 | *size = sbuf.st_size; |
| 303 | } |
| 304 | return s; |
| 305 | } |
| 306 | |
| 307 | Status PosixFileSystem::Stat(const string& fname, FileStatistics* stats) { |
| 308 | Status s; |