MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getCanonicalPath

Function getCanonicalPath

programs/server/Server.cpp:578–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576{
577
578std::string getCanonicalPath(std::string && path, const std::string & base = {})
579{
580 Poco::trimInPlace(path);
581 if (path.empty())
582 throw Exception(ErrorCodes::INVALID_CONFIG_PARAMETER, "path configuration parameter is empty");
583 if (!base.empty() && fs::path(path).is_relative())
584 path = fs::weakly_canonical(fs::path(base) / path);
585 if (path.back() != '/')
586 path += '/';
587 return std::move(path);
588}
589
590Poco::Net::TCPServerParams::Ptr makeServerParams(const ServerSettings & server_settings)
591{

Callers 3

getDefaultCorePathMethod · 0.85
sanityChecksFunction · 0.85
mainMethod · 0.85

Calls 3

ExceptionClass · 0.50
emptyMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected