libpathrs
libpathrs copied to clipboard
go: add io/fs.FS implementation for bindings
While a lot of Go users still haven't migrated wholesale to io/fs, it would be nice to have an implementation of that interface that is actually safely constrained by libpathrs.
One key thing to keep in mind is that we must implement io/fs.SubFS, otherwise Go will create insecure filepath.Join-based chroots if you use the fallback implementation of fs.Sub. I suspect we would want to segregate the io.FS interface from our "standard" interface because the methods are kind of weird and most people would probably not want to use them.