kubo/fuse/readonly/mount_unix.go
Richard Littauer 9843e86258 Changed so only explicit ipfs cli commands are lowercased
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-10-27 22:55:13 -07:00

21 lines
541 B
Go

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