mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
26 lines
376 B
Go
26 lines
376 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/gogf/gf/g"
|
|
"github.com/gogf/gf/g/os/gspath"
|
|
"github.com/gogf/gf/g/os/gtime"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
sp := gspath.New()
|
|
path := "/Users/john/Temp"
|
|
rp, err := sp.Add(path)
|
|
fmt.Println(err)
|
|
fmt.Println(rp)
|
|
fmt.Println(sp)
|
|
|
|
gtime.SetInterval(5*time.Second, func() bool {
|
|
g.Dump(sp.AllPaths())
|
|
return true
|
|
})
|
|
|
|
select {}
|
|
}
|