文件时间
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
}
文章名称:创新互联GoFrame教程:GoFramegfile-文件时间
本文来源:
http://cdxtjz.cn/article/coicicc.html