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

Method hasExternalFile

filetree/tree.go:318–325  ·  view source on GitHub ↗

hasExternalFile returns true and index if given abs path exists on ExtFiles list. false and -1 if not.

(fpath string)

Source from the content-addressed store, hash-verified

316// hasExternalFile returns true and index if given abs path exists on ExtFiles list.
317// false and -1 if not.
318func (ft *Tree) hasExternalFile(fpath string) (bool, int) {
319 for i, f := range ft.externalFiles {
320 if f == fpath {
321 return true, i
322 }
323 }
324 return false, -1
325}
326
327// externalNodeByPath returns Node for given file path, and true, if it
328// exists in the external files list. Otherwise returns nil, false.

Callers 2

AddExternalFileMethod · 0.95
externalNodeByPathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected