I’ve been working on a file system API for Kotlin Multiplatform. It’s simple & fast and I’m excited about it.
We’ve got these:
FileSystem.SYSTEM
: the local file system.FakeFileSystem
: our in-memory implementation. UsecheckNoOpenFiles()
to be confident that your code doesn’t leak!ForwardingFileSystem
: like interceptors for files?!ZipFileSystem
: read any.zip
or.jar
file.ResourceFileSystem
: read classpath resources like they’re files.
To do zips we needed a random access API and so I added FileHandle
. It integrates Okio’s Source
and Sink
APIs to support streaming within a file.
Tonight I released Okio 3.0.0-alpha.6. It wraps up all of the above in an unstable API.