MCPcopy Create free account
hub / github.com/crownengine/crown / callback

Method callback

src/core/unit_tests.cpp:1949–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1947 }
1948
1949 static void callback(const char *begin, const char *end, void *user_data)
1950 {
1951 UserData *ud = (UserData *)user_data;
1952 ud->done = false;
1953
1954 for (const char *cur = begin; cur != end;) {
1955 const char *path = NULL;
1956 const char *path_modified = NULL;
1957
1958 u32 type = *(u32 *)cur;
1959 cur += 4;
1960 CE_UNUSED(*(u32 *)cur);
1961 cur += 4;
1962 bool is_dir = *(bool *)cur;
1963 cur += 1;
1964 path = (const char *)cur;
1965 cur += strlen32(path) + 1;
1966 if (type == FileMonitorEvent::RENAMED) {
1967 path_modified = (const char *)cur;
1968 cur += strlen32(path_modified) + 1;
1969 }
1970
1971 ud->check(user_data, (FileMonitorEvent::Enum)type, is_dir, path, path_modified);
1972 }
1973
1974 ud->done = true;
1975 ud->cv.signal();
1976 }
1977 };
1978
1979 struct ScopedUniqueWorkingDir

Callers

nothing calls this directly

Calls 2

checkMethod · 0.80
signalMethod · 0.80

Tested by

no test coverage detected