LatestFileMod returns the most recent mod time of files in the tree. If cat is != fileinfo.Unknown then it only uses files of that type (e.g., fileinfo.Code to find any code files)
(cat fileinfo.Categories)
| 142 | // If cat is != fileinfo.Unknown then it only uses files of that type |
| 143 | // (e.g., fileinfo.Code to find any code files) |
| 144 | func (fn *Node) LatestFileMod(cat fileinfo.Categories) time.Time { |
| 145 | tmod := time.Time{} |
| 146 | fn.WidgetWalkDown(func(cw core.Widget, cwb *core.WidgetBase) bool { |
| 147 | sfn := AsNode(cw) |
| 148 | if sfn == nil { |
| 149 | return tree.Continue |
| 150 | } |
| 151 | if cat != fileinfo.UnknownCategory { |
| 152 | if sfn.Info.Cat != cat { |
| 153 | return tree.Continue |
| 154 | } |
| 155 | } |
| 156 | ft := (time.Time)(sfn.Info.ModTime) |
| 157 | if ft.After(tmod) { |
| 158 | tmod = ft |
| 159 | } |
| 160 | return tree.Continue |
| 161 | }) |
| 162 | return tmod |
| 163 | } |
nothing calls this directly
no test coverage detected