GoFrame gfile-文件时间
文件时间
MTime
func MTime(path string) time.Time
func ExampleMTime() {
t := gfile.MTime(gfile.TempDir())
fmt.Println(t)
// May Output:
// 2021-11-02 15:18:43.901141 +0800 CST
}
MTimestamp
func MTimestamp(path string) int64
func ExampleMTimestamp() {
t := gfile.MTimestamp(gfile.TempDir())
fmt.Println(t)
// May Output:
// 1635838398
}
MTimestampMilli
func MTimestampMilli(path string) int64
func ExampleMTimestampMilli() {
t := gfile.MTimestampMilli(gfile.TempDir())
fmt.Println(t)
// May Output:
// 1635838529330
}