MCPcopy Index your code
hub / github.com/perkeep/perkeep / NewRootedCamliFileSystem

Function NewRootedCamliFileSystem

pkg/fs/fs.go:88–101  ·  view source on GitHub ↗

NewRootedCamliFileSystem returns a CamliFileSystem with a node based on a blobref as its base.

(cli *client.Client, fetcher blob.Fetcher, root blob.Ref)

Source from the content-addressed store, hash-verified

86// NewRootedCamliFileSystem returns a CamliFileSystem with a node based on a blobref
87// as its base.
88func NewRootedCamliFileSystem(cli *client.Client, fetcher blob.Fetcher, root blob.Ref) (*CamliFileSystem, error) {
89 fs := newCamliFileSystem(fetcher)
90 fs.client = cli
91
92 n, err := fs.newNodeFromBlobRef(root)
93
94 if err != nil {
95 return nil, err
96 }
97
98 fs.root = n
99
100 return fs, nil
101}
102
103// node implements fuse.Node with a read-only Camli "file" or
104// "directory" blob.

Callers

nothing calls this directly

Calls 2

newCamliFileSystemFunction · 0.85
newNodeFromBlobRefMethod · 0.80

Tested by

no test coverage detected