MCPcopy Create free account
hub / github.com/cogentcore/core / RelativePathFrom

Method RelativePathFrom

filetree/node.go:498–500  ·  view source on GitHub ↗

RelativePathFrom returns the relative path from node for given full path

(fpath core.Filename)

Source from the content-addressed store, hash-verified

496
497// RelativePathFrom returns the relative path from node for given full path
498func (fn *Node) RelativePathFrom(fpath core.Filename) string {
499 return fsx.RelativeFilePath(string(fpath), string(fn.Filepath))
500}
501
502// dirsTo opens all the directories above the given filename, and returns the node
503// for element at given path (can be a file or directory itself -- not opened -- just returned)

Callers 10

findDirNodeMethod · 0.95
dirsToMethod · 0.95
watchUpdateMethod · 0.80
watchPathMethod · 0.80
unWatchPathMethod · 0.80
isDirOpenMethod · 0.80
setDirOpenMethod · 0.80
setDirClosedMethod · 0.80
setDirSortByMethod · 0.80
dirSortByModTimeMethod · 0.80

Calls 1

RelativeFilePathFunction · 0.92

Tested by

no test coverage detected