hi there,

I am looking for an io/fs.FS-based package that can "mount" a provided
io/fs.FS filesystem under some directory on some other io/fs.FS.

ie: more or less the io/fs equivalent of:
$> mount /dev/sd4 /mnt/sub/dir

subtree := os.DirFS("/path/to/some/dir")
_, _ = subtree.Open("file1.txt") // ok: /path/to/some/dir/file1.txt

root := os.DirFS("/")
root, err := mountfs.Mount(root, "/mnt/sub/dir", subtree)
_, _ = root.Open("/mnt/sub/dir/file1.txt") // ok.

I know of mergefs[1], but that's not quite what I want (even if it's
probably part of the solution...)

Anybody already coded that up?
(I've tried various combinations of "io/fs" with "merge/overlay", to no
avail.)

thanks,
-s

[1]: https://github.com/laher/mergefs

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/fA15io4TOjp01DMBsGyXCRLycEN2oEucEdbifPDw81g%40cp4-web-028.plabs.ch.

Reply via email to