MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / runtime_windows_file_snapshot

Function runtime_windows_file_snapshot

src/daemon/runtime.c:694–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694static 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
708static bool runtime_windows_file_snapshot_same(const BY_HANDLE_FILE_INFORMATION *first_information,
709 const LARGE_INTEGER *first_size,

Calls

no outgoing calls

Tested by

no test coverage detected