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

Method setOpen

filetree/dir.go:59–65  ·  view source on GitHub ↗

SetOpenState sets the given directory's open flag

(path string, open bool)

Source from the content-addressed store, hash-verified

57
58// SetOpenState sets the given directory's open flag
59func (dm *DirFlagMap) setOpen(path string, open bool) {
60 dm.init()
61 defer dm.mu.Unlock()
62 df := dm.Map[path]
63 df.SetFlag(open, dirIsOpen)
64 dm.Map[path] = df
65}
66
67// sortByName returns true if path is sorted by name (default if not in map)
68func (dm *DirFlagMap) sortByName(path string) bool {

Callers 2

setDirOpenMethod · 0.80
setDirClosedMethod · 0.80

Calls 3

initMethod · 0.95
UnlockMethod · 0.65
SetFlagMethod · 0.65

Tested by

no test coverage detected