mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 13:18:01 +08:00
28 lines
436 B
Go
28 lines
436 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 {
|
|
|
|
}
|
|
}
|