afero icon indicating copy to clipboard operation
afero copied to clipboard

463 support os root

Open sean9999 opened this issue 6 months ago • 1 comments
trafficstars

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.

sean9999 avatar May 25 '25 00:05 sean9999

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 25 '25 00:05 CLAassistant

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.

sagikazarmark avatar Jul 29 '25 13:07 sagikazarmark

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

sean9999 avatar Aug 16 '25 13:08 sean9999