Open purpleidea opened 6 years ago
@purpleidea I recommend implementing a billy.Filesystem on top of an afero one. We are open for PRs
FWIW I implemented this Afero compatibility for go-vfs
with go-vfsafero
using exactly the idea that @purpleidea describes here.
I've started a go-billy fs that uses afero as a backend. Still needs documentation but you should be able to wrap it with:
billyfs := desfacer.New(aferofs)
+1
I use https://github.com/spf13/afero/ in a number of ways. I wanted to use https://github.com/src-d/go-git/ with that as the backing filesystem. As a result, I'd have to either switch to this, or implement a compatibility layer. Since the former is not possible, I think the later might be a good approach.
I'm opening this issue to track that progress. Basically we should have a helper function which takes a fileystem from afero and returns something that implements this interface. That should probably be in the afero lib, and the opposite should be here.