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

Method RelativePath

filetree/node.go:277–282  ·  view source on GitHub ↗

RelativePath returns the relative path from root for this node

()

Source from the content-addressed store, hash-verified

275
276// RelativePath returns the relative path from root for this node
277func (fn *Node) RelativePath() string {
278 if fn.IsIrregular() || fn.FileRoot == nil {
279 return fn.Name
280 }
281 return fsx.RelativeFilePath(string(fn.Filepath), string(fn.FileRoot.Filepath))
282}
283
284// dirFileList returns the list of files in this directory,
285// sorted according to DirsOnTop and SortByModTime options

Callers 1

UpdateAllVCSMethod · 0.80

Calls 2

IsIrregularMethod · 0.95
RelativeFilePathFunction · 0.92

Tested by

no test coverage detected