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

Method removeExternalFile

filetree/tree.go:306–314  ·  view source on GitHub ↗

removeExternalFile removes external file from maintained list; returns true if removed.

(fpath string)

Source from the content-addressed store, hash-verified

304
305// removeExternalFile removes external file from maintained list; returns true if removed.
306func (ft *Tree) removeExternalFile(fpath string) bool {
307 for i, ef := range ft.externalFiles {
308 if ef == fpath {
309 ft.externalFiles = append(ft.externalFiles[:i], ft.externalFiles[i+1:]...)
310 return true
311 }
312 }
313 return false
314}
315
316// hasExternalFile returns true and index if given abs path exists on ExtFiles list.
317// false and -1 if not.

Callers 1

removeFromExternsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected