| 474 | } |
| 475 | |
| 476 | Status WindowsFileSystem::GetFileSize(const string& fname, uint64* size) { |
| 477 | string translated_fname = TranslateName(fname); |
| 478 | std::wstring ws_translated_dir = Utf8ToWideChar(translated_fname); |
| 479 | Status result; |
| 480 | WIN32_FILE_ATTRIBUTE_DATA attrs; |
| 481 | if (TRUE == ::GetFileAttributesExW(ws_translated_dir.c_str(), |
| 482 | GetFileExInfoStandard, &attrs)) { |
| 483 | ULARGE_INTEGER file_size; |
| 484 | file_size.HighPart = attrs.nFileSizeHigh; |
| 485 | file_size.LowPart = attrs.nFileSizeLow; |
| 486 | *size = file_size.QuadPart; |
| 487 | } else { |
| 488 | string context = "Can not get size for: " + fname; |
| 489 | result = IOErrorFromWindowsError(context, ::GetLastError()); |
| 490 | } |
| 491 | return result; |
| 492 | } |
| 493 | |
| 494 | Status WindowsFileSystem::RenameFile(const string& src, const string& target) { |
| 495 | Status result; |
nothing calls this directly
no test coverage detected