MCPcopy Create free account
hub / github.com/ErrorFlynn/ytdlp-interface / to_relative_path

Method to_relative_path

ytdlp-interface/util.cpp:801–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799
800
801fs::path util::to_relative_path(const fs::path &abs)
802{
803 auto path {fs::relative(abs)};
804 const auto path_string {path.string()};
805 if(path_string.starts_with("..\\") || path_string.empty())
806 return abs;
807 else if(path_string == ".")
808 return ".\\";
809 return ".\\" / path;
810}
811
812
813fs::path util::appdir()

Callers

nothing calls this directly

Calls 2

stringMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected