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

Method GetNodeByUUID

common/storage/sql/index/folder-size-cache.go:85–100  ·  view source on GitHub ↗

GetNodeByUUID returns the node stored with the unique uuid

(ctx context.Context, uuid string)

Source from the content-addressed store, hash-verified

83
84// GetNodeByUUID returns the node stored with the unique uuid
85func (dao *FolderSizeCacheSQL) GetNodeByUUID(ctx context.Context, uuid string) (tree.ITreeNode, error) {
86
87 node, err := dao.DAO.GetNodeByUUID(ctx, uuid)
88 if err != nil {
89 return nil, err
90 }
91
92 if !node.GetNode().IsLeaf() {
93 err := dao.folderSize(ctx, node)
94 if err != nil {
95 log.Logger(ctx).Debug("Unable to use cache for folder size", zap.Error(err))
96 }
97 }
98
99 return node, nil
100}
101
102// GetNodeChildren List
103func (dao *FolderSizeCacheSQL) GetNodeChildren(ctx context.Context, path *tree.MPath, filter ...*tree.MetaFilter) chan interface{} {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected