MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / FileSystem_getModificationTime

Function FileSystem_getModificationTime

Tools/ToolsBootstrap.c:614–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612 size_t lenC = strlen(c);
613 char* result = (char*)malloc(lenA + lenB + lenC + 1);
614 if (!result) return NULL;
615 memcpy(result, a, lenA);
616 memcpy(result + lenA, b, lenB);
617 memcpy(result + lenA + lenB, c, lenC);
618 result[lenA + lenB + lenC] = 0;
619 return result;
620}
621
622char* detectTargetOS(void) {
623#ifdef _WIN32
624 return String_duplicate("Windows");
625#else
626 FILE* uname_file = POPEN("uname", "r");
627 if (uname_file) {
628 char buf[256];
629 if (fgets(buf, sizeof(buf), uname_file)) {
630 size_t len = strlen(buf);
631 if (len > 0 && buf[len - 1] == '\n') buf[len - 1] = 0;
632 PCLOSE(uname_file);
633 return String_duplicate(buf);
634 }
635 PCLOSE(uname_file);
636 }
637 return String_duplicate("POSIX");
638#endif
639}
640
641void String_unescapeJsonInPlace(char* str) {
642 if (!str) return;

Callers 4

checkNeedsRebuildFunction · 0.85
needsRebuildToolsFunction · 0.85
needsRebuildToolObjFunction · 0.85
needsRebuildExeFunction · 0.85

Calls 2

statClass · 0.70

Tested by

no test coverage detected