afero
afero copied to clipboard
463 support os root
add support for os.Root. see: https://go.dev/blog/osroot.
This code mainly sticks to just the task at hand, however in order to make CI tests pass, I had to do some very minor clean-ups.
I introduce the interface Root, which satisfies the same method-set as os.Root.
Root is basically a "chroot". It offers a root-relative view into a filesystem that you can't escape.
Root is powered by *rootFs, which simply wraps *BasePathFs, changing the signature slightly so that it satisfies the interface, and the functionality that os.Root provides.
Thanks @sean9999
I think this is a great addition!
If you don't mind, I'd like to wait for 1.25 to be released: we usually try to support two versions.
If you don't mind, I'd like to wait for 1.25 to be released: we usually try to support two versions.
It's time, boss! =) https://go.dev/blog/go1.25
I had some "only v1.24" conditions in linter tests. I changed it to use >= v1.24.
I also rebased to the tip of master