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

Method CheckUpdate

tensor/cmd/ttail/file.go:52–58  ·  view source on GitHub ↗

CheckUpdate checks if file has been modified -- returns true if so

()

Source from the content-addressed store, hash-verified

50
51// CheckUpdate checks if file has been modified -- returns true if so
52func (fl *File) CheckUpdate() bool {
53 st, err := os.Stat(fl.FName)
54 if err != nil {
55 return false
56 }
57 return st.ModTime().After(fl.ModTime)
58}
59
60// Read reads data from file
61func (fl *File) Read() error {

Callers 1

CheckUpdatesMethod · 0.80

Calls 2

ModTimeMethod · 0.80
StatMethod · 0.45

Tested by

no test coverage detected