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

Function cbm_file_size

src/foundation/platform.c:176–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176int64_t cbm_file_size(const char *path) {
177 wchar_t *wpath = cbm_path_to_wide(path);
178 if (!wpath) {
179 return CBM_NOT_FOUND;
180 }
181 WIN32_FILE_ATTRIBUTE_DATA fad;
182 BOOL ok = GetFileAttributesExW(wpath, GetFileExInfoStandard, &fad);
183 free(wpath);
184 if (!ok) {
185 return CBM_NOT_FOUND;
186 }
187 LARGE_INTEGER sz;
188 sz.HighPart = (LONG)fad.nFileSizeHigh; // cppcheck-suppress unreadVariable
189 sz.LowPart = fad.nFileSizeLow; // cppcheck-suppress unreadVariable
190 return (int64_t)sz.QuadPart;
191}
192
193char *cbm_normalize_path_sep(char *path) {
194 if (path) {

Callers 14

watcher_git_runFunction · 0.85
handle_list_projectsFunction · 0.85
try_artifact_bootstrapFunction · 0.85
mcp_scan_pre_spawn_causeFunction · 0.85
maybe_auto_indexFunction · 0.85
handle_project_healthFunction · 0.85
test_mcp.cFile · 0.85

Calls 2

cbm_path_to_wideFunction · 0.85
statClass · 0.70