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

Method closeBuf

filetree/node.go:488–495  ·  view source on GitHub ↗

closeBuf closes the file in its buffer if it is open. returns true if closed.

()

Source from the content-addressed store, hash-verified

486// closeBuf closes the file in its buffer if it is open.
487// returns true if closed.
488func (fn *Node) closeBuf() bool {
489 if fn.Buffer == nil {
490 return false
491 }
492 fn.Buffer.Close(nil)
493 fn.Buffer = nil
494 return true
495}
496
497// RelativePathFrom returns the relative path from node for given full path
498func (fn *Node) RelativePathFrom(fpath core.Filename) string {

Callers 4

deleteFileMethod · 0.95
RenameFileMethod · 0.95
deleteFilesImplMethod · 0.80
removeFromExternsMethod · 0.80

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected