PHP » GoLang |
login |
register |
about
|
filemtimefilemtime[code] func Filemtime(filename string) (int64, error) { fd, err := os.Open(filename) if err != nil { return 0, err } defer fd.Close() fileinfo, err := fd.Stat() if err != nil { return 0, err } return fileinfo.ModTime().Unix(), nil } [/code] |