MCPcopy Create free account
hub / github.com/Illation/ETEngine / IsAbsolutePath

Method IsAbsolutePath

Engine/source/EtCore/FileSystem/FileUtil.cpp:495–512  ·  view source on GitHub ↗

--------------------------------- FileUtil::GetAbsolutePath Gets the absolute path relative to the executable

Source from the content-addressed store, hash-verified

493// Gets the absolute path relative to the executable
494//
495bool FileUtil::IsAbsolutePath(std::string const& path)
496{
497#if defined(PLATFORM_Linux)
498
499 return path[0] == '/' || path[0] == '~';
500
501#elif defined(PLATFORM_Win)
502
503 // if the path has a colon, it's absolute
504 return path.find(":") != std::string::npos;
505
506#else
507
508 LOG("FileUtil::IsAbsolutePath > Checking if a path is absolute is not implemented for this platform!", LogLevel::Warning);
509 return false;
510
511#endif
512}
513
514
515} // namespace core

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected