https://kotlinlang.org logo
#korge
Title
# korge
a

Akshay Verma

10/11/2021, 7:43 AM
Copy code
vfsFile.writeChunk(byteArray, offset = offset)
this doesn't seem to be working in iOS (or any write methods be it as trivial as
writeString()
) The file creation is happening so there must be some problem inside write method
d

Deactivated User

10/11/2021, 8:48 AM
Which VFS are you using? Do you have a small snipptet reproducing the issue?
a

Akshay Verma

10/11/2021, 8:49 AM
Copy code
val vfsFile = localVfs(path)
vfsFile.writeString("Hello World!")
getting path in iOS
Copy code
override fun getRootDir(): String {
    val nsUserDomainMask = 1UL
    val nsCachesDirectory = 13UL
    val cacheDirectoryList = NSFileManager.defaultManager().URLsForDirectory(
        nsCachesDirectory,
        nsUserDomainMask
    )

    return (cacheDirectoryList.first() as? NSURL)?.path() ?: ""
}
d

Deactivated User

10/18/2021, 7:35 PM
Just created this issue to investigate: https://github.com/korlibs/korge-next/issues/366
20 Views