fs: a much more complete directory hierarchy and everything mostly working in read-only mode.

This commit is contained in:
fiatjaf
2025-03-10 14:38:19 -03:00
parent 186948db9a
commit a828ee3793
8 changed files with 479 additions and 44 deletions

12
fs.go
View File

@@ -41,15 +41,21 @@ var fsCmd = &cli.Command{
return fmt.Errorf("must be called with a directory path to serve as the mountpoint as an argument")
}
root := nostrfs.NewNostrRoot(ctx, sys, keyer.NewReadOnlyUser(c.String("pubkey")))
root := nostrfs.NewNostrRoot(
ctx,
sys,
keyer.NewReadOnlyUser(c.String("pubkey")),
mountpoint,
)
// create the server
log("- mounting at %s... ", color.HiCyanString(mountpoint))
timeout := time.Second * 120
server, err := fs.Mount(mountpoint, root, &fs.Options{
MountOptions: fuse.MountOptions{
Debug: isVerbose,
Name: "nak",
Debug: isVerbose,
Name: "nak",
FsName: "nak",
},
AttrTimeout: &timeout,
EntryTimeout: &timeout,