filesystem restructure work.

Add mount/unmountCommonPath, mount/unmountFullPath, getFullCommonPath.

Reimplement identity and save directory code in terms of new commonpath code.

Add internal createRealDirectory function (not exposed, currently).
This commit is contained in:
Alex Szpakowski
2021-01-01 16:29:40 -04:00
parent f00f5cb51a
commit f151190548
8 changed files with 330 additions and 229 deletions
+1 -1
View File
@@ -38,10 +38,10 @@ enum UserDirectory
USER_DIRECTORY_DOCUMENTS,
USER_DIRECTORY_DESKTOP,
USER_DIRECTORY_CACHES,
USER_DIRECTORY_TEMP,
};
std::string getUserDirectory(UserDirectory dir);
std::string getExecutablePath();
} // apple
+3
View File
@@ -52,6 +52,9 @@ std::string getUserDirectory(UserDirectory dir)
case USER_DIRECTORY_CACHES:
nsdir = NSCachesDirectory;
break;
case USER_DIRECTORY_TEMP:
nsdir = NSItemReplacementDirectory;
break;
}
NSArray<NSURL *> *dirs = [[NSFileManager defaultManager] URLsForDirectory:nsdir inDomains:NSUserDomainMask];