I’m running into a strange error with okio on iOS. I need to create a folder if it doesn’t exist, so I have a line that says
if(!fileSystem.exists(path)) fileSystem.createDirectory(path, true)
. I also have a log on the line before printing the value of the exists check. In my logs, I see
Does it exist yet? false
Uncaught Kotlin exception: okio.IOException: File exists
I know that this function will only run on the main thread, so it’s not a threading issue, and I’m using FileSystem.SYSTEM on iOS. If I set mustCreate to false, then it runs the createDirectory line, but no folder is created. Logs also show that the parent path exists and is definitely in my app’s folder.