| 692 | } |
| 693 | |
| 694 | static bool runtime_windows_file_snapshot(HANDLE file, BY_HANDLE_FILE_INFORMATION *information, |
| 695 | LARGE_INTEGER *size) { |
| 696 | if (!information || !size) { |
| 697 | return false; |
| 698 | } |
| 699 | memset(information, 0, sizeof(*information)); |
| 700 | size->QuadPart = -1; |
| 701 | return file != INVALID_HANDLE_VALUE && GetFileType(file) == FILE_TYPE_DISK && |
| 702 | GetFileInformationByHandle(file, information) != 0 && |
| 703 | (information->dwFileAttributes & |
| 704 | (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT)) == 0 && |
| 705 | GetFileSizeEx(file, size) != 0 && size->QuadPart >= 0; |
| 706 | } |
| 707 | |
| 708 | static bool runtime_windows_file_snapshot_same(const BY_HANDLE_FILE_INFORMATION *first_information, |
| 709 | const LARGE_INTEGER *first_size, |
no outgoing calls
no test coverage detected