korge icon indicating copy to clipboard operation
korge copied to clipboard

Adding support for getting standard directory paths and provide vfs for them on Apple devices

Open soywiz opened this issue 4 years ago • 1 comments
trafficstars

We can also provide support for other platforms.

Relevant links:

  • https://stackoverflow.com/questions/35439491/ios-cant-get-content-of-caches-directory
  • https://developer.apple.com/documentation/foundation/1414224-nssearchpathfordirectoriesindoma?language=objc
  • https://developer.apple.com/documentation/foundation/nssearchpathdirectory?language=objc

soywiz avatar Nov 28 '20 15:11 soywiz

Move this to StandardDirectories.getSettingsFolder(gameId: String) or something like that.

val realSettingsFolder: String by lazy {
    when {
        settingsFolder != null -> settingsFolder!!
        else -> when {
            OS.isMac -> "/Users/${Environment["USER"]}/Library/Preferences/$gameIdFolder"
            OS.isWindows -> "${Environment["APPDATA"]}/$gameIdFolder"
            else -> "${Environment["HOME"]}/.config/$gameIdFolder"
        }
    }

soywiz avatar May 12 '22 19:05 soywiz