mirror of
https://github.com/Tencent/MMKV.git
synced 2026-10-17 04:30:56 +08:00
1. NameSpace almost work on iOS
2. Upgrade to iOS 13, watchOS 6 3. Dont mkPath() on ReadOnly mode
This commit is contained in:
@@ -36,8 +36,10 @@
|
||||
# include <dirent.h>
|
||||
# include <cstring>
|
||||
# include <unistd.h>
|
||||
# include <filesystem>
|
||||
|
||||
using namespace std;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace mmkv {
|
||||
|
||||
@@ -418,6 +420,13 @@ size_t getPageSize() {
|
||||
return static_cast<size_t>(getpagesize());
|
||||
}
|
||||
|
||||
extern MMKVPath_t absolutePath(const MMKVPath_t &path) {
|
||||
fs::path relative_path(path);
|
||||
fs::path absolute_path = fs::absolute(relative_path);
|
||||
fs::path normalized = fs::weakly_canonical(absolute_path);
|
||||
return normalized.string();
|
||||
}
|
||||
|
||||
#ifndef MMKV_APPLE
|
||||
|
||||
static pair<MMKVPath_t, int> createUniqueTempFile(const char *prefix) {
|
||||
|
||||
Reference in New Issue
Block a user