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

Method treeNodeToDataSourcePath

data/tree/grpc/handler.go:188–204  ·  view source on GitHub ↗
(node *tree.Node)

Source from the content-addressed store, hash-verified

186}
187
188func (s *TreeServer) treeNodeToDataSourcePath(node *tree.Node) (dataSourceName string, dataSourcePath string) {
189
190 path := strings.Trim(node.GetPath(), "/")
191 if path == "" {
192 return "", ""
193 }
194 parts := strings.Split(path, "/")
195 dataSourceName = parts[0]
196 if len(parts) > 1 {
197 dataSourcePath = strings.Join(parts[1:], "/")
198 } else {
199 dataSourcePath = ""
200 }
201
202 return dataSourceName, dataSourcePath
203
204}
205
206func (s *TreeServer) updateDataSourceNode(node *tree.Node, dataSourceName string) {
207

Callers 6

CreateNodeMethod · 0.95
ReadNodeMethod · 0.95
ListNodesMethod · 0.95
ListNodesWithLimitMethod · 0.95
UpdateNodeMethod · 0.95
DeleteNodeMethod · 0.95

Calls 2

GetPathMethod · 0.65
JoinMethod · 0.45

Tested by

no test coverage detected