MCPcopy Create free account
hub / github.com/Tencent/MMKV / absolutePath

Function absolutePath

Core/MemoryFile.cpp:480–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480extern MMKVPath_t absolutePath(const MMKVPath_t &path) {
481 fs::path relative_path(path);
482 fs::path absolute_path = fs::absolute(relative_path);
483 try {
484 fs::path normalized = fs::weakly_canonical(absolute_path);
485 return normalized.string();
486 } catch (std::exception &e) {
487 MMKVError("fail to weakly_canonical() path %s, error: %s", absolute_path.c_str(), e.what());
488 }
489 return absolute_path.string();
490}
491
492#ifndef MMKV_APPLE
493

Callers 3

mmapedKVKeyFunction · 0.70
mappedKVPathWithIDFunction · 0.70
nameSpaceMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected