github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/fuse/readonly/mount_unix.go (about) 1 // +build linux darwin freebsd 2 // +build !nofuse 3 4 package readonly 5 6 import ( 7 core "github.com/ipfs/go-ipfs/core" 8 mount "github.com/ipfs/go-ipfs/fuse/mount" 9 ) 10 11 // Mount mounts ipfs at a given location, and returns a mount.Mount instance. 12 func Mount(ipfs *core.IpfsNode, mountpoint string) (mount.Mount, error) { 13 cfg, err := ipfs.Repo.Config() 14 if err != nil { 15 return nil, err 16 } 17 allow_other := cfg.Mounts.FuseAllowOther 18 fsys := NewFileSystem(ipfs) 19 return mount.NewMount(ipfs.Process(), fsys, mountpoint, allow_other) 20 }