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

Function absolutePath

Core/MemoryFile_Win32.cpp:303–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303MMKVPath_t absolutePath(const MMKVPath_t& path) {
304 fs::path relative_path(path);
305 fs::path absolute_path = fs::absolute(relative_path);
306 try {
307 fs::path normalized = fs::weakly_canonical(absolute_path);
308 return normalized.wstring();
309 } catch (std::exception &e) {
310 const auto &utf8Path = MMKVPath_t2String(absolute_path.wstring());
311 MMKVError("fail to weakly_canonical() path %s, error: %s", utf8Path.c_str(), e.what());
312 }
313 return absolute_path.wstring();
314}
315
316bool isFileExist(const MMKVPath_t &nsFilePath) {
317 if (nsFilePath.empty()) {

Callers

nothing calls this directly

Calls 1

MMKVPath_t2StringFunction · 0.85

Tested by

no test coverage detected