MCPcopy Create free account
hub / github.com/pydio/cells / getFS

Method getFS

data/source/objects/handler.go:52–63  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

50}
51
52func (t *FsBrowser) getFS(ctx context.Context) (fs afero.Fs, hasRootRef bool) {
53 // Backward-compat
54 confLegacy := config.Get(ctx, "services", common.ServiceDataObjectsGRPC+".peer").String()
55
56 conf := config.Get(ctx, "services", common.ServiceDataObjectsGRPC)
57 fs = afero.NewOsFs()
58 restrict := conf.Val("allowedLocalDsFolder").Default(confLegacy).String()
59 if hasRootRef = restrict != ""; hasRootRef {
60 fs = afero.NewBasePathFs(fs, restrict)
61 }
62 return
63}
64
65func (t *FsBrowser) SymlinkInfo(path string, info os.FileInfo) (bool, tree.NodeType, string) {
66 if info.Mode()&os.ModeSymlink != 0 {

Callers 4

ReadNodeMethod · 0.95
ListNodesMethod · 0.95
CreateNodeMethod · 0.95
DeleteNodeMethod · 0.95

Calls 4

GetFunction · 0.92
StringMethod · 0.65
DefaultMethod · 0.65
ValMethod · 0.65

Tested by

no test coverage detected