gf/geg/os/gspath/gspath.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 {
}
}