mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 03:07:45 +08:00
38 lines
713 B
Go
38 lines
713 B
Go
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
//
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
// If a copy of the MIT was not distributed with this file,
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
package gfile_test
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gogf/gf/v2/os/gfile"
|
|
)
|
|
|
|
func ExampleMTime() {
|
|
t := gfile.MTime(gfile.TempDir())
|
|
fmt.Println(t)
|
|
|
|
// May Output:
|
|
// 2021-11-02 15:18:43.901141 +0800 CST
|
|
}
|
|
|
|
func ExampleMTimestamp() {
|
|
t := gfile.MTimestamp(gfile.TempDir())
|
|
fmt.Println(t)
|
|
|
|
// May Output:
|
|
// 1635838398
|
|
}
|
|
|
|
func ExampleMTimestampMilli() {
|
|
t := gfile.MTimestampMilli(gfile.TempDir())
|
|
fmt.Println(t)
|
|
|
|
// May Output:
|
|
// 1635838529330
|
|
}
|