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

Method GetNodeByPath

common/storage/sql/index/folder-size-cache.go:70–82  ·  view source on GitHub ↗
(ctx context.Context, nodePath string)

Source from the content-addressed store, hash-verified

68}
69
70func (dao *FolderSizeCacheSQL) GetNodeByPath(ctx context.Context, nodePath string) (tree.ITreeNode, error) {
71 node, err := dao.DAO.GetNodeByPath(ctx, nodePath)
72 if err != nil {
73 return nil, err
74 }
75 if node != nil && !node.GetNode().IsLeaf() {
76 err := dao.folderSize(ctx, node)
77 if err != nil {
78 log.Logger(ctx).Debug("Unable to get folder size from children", zap.Error(err))
79 }
80 }
81 return node, nil
82}
83
84// GetNodeByUUID returns the node stored with the unique uuid
85func (dao *FolderSizeCacheSQL) GetNodeByUUID(ctx context.Context, uuid string) (tree.ITreeNode, error) {

Callers

nothing calls this directly

Calls 7

folderSizeMethod · 0.95
LoggerFunction · 0.92
GetNodeByPathMethod · 0.65
IsLeafMethod · 0.65
GetNodeMethod · 0.65
DebugMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected