libpathrs icon indicating copy to clipboard operation
libpathrs copied to clipboard

go: add io/fs.FS implementation for bindings

Open cyphar opened this issue 1 year ago • 0 comments

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.

cyphar avatar May 06 '24 08:05 cyphar