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

Method sortByModTime

filetree/dir.go:78–85  ·  view source on GitHub ↗

sortByModTime returns true if path is sorted by mod time

(path string)

Source from the content-addressed store, hash-verified

76
77// sortByModTime returns true if path is sorted by mod time
78func (dm *DirFlagMap) sortByModTime(path string) bool {
79 dm.init()
80 defer dm.mu.Unlock()
81 if df, ok := dm.Map[path]; ok {
82 return df.HasFlag(dirSortByModTime)
83 }
84 return false
85}
86
87// setSortBy sets the given directory's sort by option
88func (dm *DirFlagMap) setSortBy(path string, modTime bool) {

Callers 1

dirSortByModTimeMethod · 0.80

Calls 3

initMethod · 0.95
UnlockMethod · 0.65
HasFlagMethod · 0.65

Tested by

no test coverage detected