MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / IsAbsolute

Method IsAbsolute

MonaBase/sources/FileSystem.cpp:540–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540bool FileSystem::IsAbsolute(const char* path) {
541 if (path[0] == '/')
542 return true; // because _stat("/file") for windows or linux search on the current disk file as a absolute path
543#if defined(_WIN32)
544 return isalpha(path[0]) && path[1]==':' && (path[2]=='/' || path[2]=='\\'); // "C:" is a file (relative path)
545#else
546 return false;
547#endif
548}
549
550string& FileSystem::MakeRelative(string& path) {
551 UInt32 count(0);

Callers

nothing calls this directly

Calls 1

isalphaFunction · 0.85

Tested by

no test coverage detected