MCPcopy
hub / github.com/rclone/rclone / splitNodePath

Method splitNodePath

backend/mega/mega.go:315–322  ·  view source on GitHub ↗

splitNodePath splits nodePath into / separated parts, returning nil if it should refer to the root. It also encodes the parts into backend-specific encoding

(nodePath string)

Source from the content-addressed store, hash-verified

313// should refer to the root.
314// It also encodes the parts into backend-specific encoding
315func (f *Fs) splitNodePath(nodePath string) (parts []string) {
316 nodePath = path.Clean(nodePath)
317 if nodePath == "." || nodePath == "/" {
318 return nil
319 }
320 nodePath = f.opt.Enc.FromStandardPath(nodePath)
321 return strings.Split(nodePath, "/")
322}
323
324// findNode looks up the node for the path of the name given from the root given
325//

Callers 2

findNodeMethod · 0.95
mkdirMethod · 0.95

Calls 1

FromStandardPathMethod · 0.65

Tested by

no test coverage detected