mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
+1
-1
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user