MCPcopy
hub / github.com/micro-editor/micro / GetModTime

Function GetModTime

internal/util/util.go:444–450  ·  view source on GitHub ↗

GetModTime returns the last modification time for a given file

(path string)

Source from the content-addressed store, hash-verified

442
443// GetModTime returns the last modification time for a given file
444func GetModTime(path string) (time.Time, error) {
445 info, err := os.Stat(path)
446 if err != nil {
447 return time.Now(), err
448 }
449 return info.ModTime(), nil
450}
451
452func HashStringMd5(str string) string {
453 return fmt.Sprintf("%x", md5.Sum([]byte(str)))

Callers 2

ExternallyModifiedMethod · 0.92
UpdateModTimeMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected