You could do your own `expect/actual` functions to...
# squarelibraries
j
You could do your own
expect/actual
functions to do this if you need it. I’ve resisted adding permissions to Okio’s file system to keep it focused. But I’m eager to hear use cases
b
I'm trying to rid my JVM project from all of
<http://java.io|java.io>
and this is the last remaining piece that I couldn't replace with okio. My biggest usecase is FakeFileSystem for testing.
j
Yay testing!
What’s the executable bit for?
Building a build system or something?
j
If it's a JVM app then how about java.nio.path and Jimfs? Its fake file system supports PosixFilePermission.
b
The project is a cli that does for kotlin scripts and maven packages what npx does for js and npm. As a result i need to work with fiile permissions in a couple of places.
j
Well you can write a custom Okio file system that delegates through NIO
FileSystem
and then drop down to
Path
when you need to set/test the executable bit (you'll still need platform awareness since
PosixFilePermission
only works on Linux and Mac). Then you can use Jimfs for your fake and wrap it the same as the platform default.