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

Function diag_win_handle_valid

src/foundation/diagnostics.c:340–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340static bool diag_win_handle_valid(HANDLE handle) {
341 BY_HANDLE_FILE_INFORMATION information;
342 return handle != INVALID_HANDLE_VALUE && GetFileType(handle) == FILE_TYPE_DISK &&
343 GetFileInformationByHandle(handle, &information) != 0 &&
344 (information.dwFileAttributes &
345 (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT)) == 0 &&
346 information.nNumberOfLinks == 1 &&
347 SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0) != 0;
348}
349
350static bool diag_write_file(const char *base_name, const char *data, size_t length, bool append) {
351 char path[CBM_PATH_MAX];

Callers 1

diag_write_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected