kubo/fuse/ipns/mount_unix.go
rht 007a12e7ef Change Process interface into object variable
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00

23 lines
557 B
Go

// +build linux darwin freebsd
// +build !nofuse
package ipns
import (
core "github.com/ipfs/go-ipfs/core"
mount "github.com/ipfs/go-ipfs/fuse/mount"
)
// Mount mounts ipns at a given location, and returns a mount.Mount instance.
func Mount(ipfs *core.IpfsNode, ipnsmp, ipfsmp string) (mount.Mount, error) {
cfg := ipfs.Repo.Config()
allow_other := cfg.Mounts.FuseAllowOther
fsys, err := NewFileSystem(ipfs, ipfs.PrivateKey, ipfsmp, ipnsmp)
if err != nil {
return nil, err
}
return mount.NewMount(ipfs.Process(), fsys, ipnsmp, allow_other)
}