update example for gres

This commit is contained in:
John
2019-08-16 00:37:12 +08:00
parent ab381dacfe
commit e58384d815
2 changed files with 4 additions and 1 deletions

View File

@ -1,12 +1,14 @@
package main
import (
_ "github.com/gogf/gf/.example/os/gres/testdata"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/gres"
_ "github.com/gogf/gf/os/gres/testdata"
)
func main() {
gres.Dump()
g.Dump(gres.Scan("/root/image/", "*", true))
g.Dump(gres.Scan("/template", "*"))
g.Dump(gres.Scan("/template/layout2", "*.html", true))
}

View File

@ -57,5 +57,6 @@ func (f *File) MarshalJSON() ([]byte, error) {
"name": f.Name(),
"size": info.Size(),
"time": info.ModTime(),
"file": !info.IsDir(),
})
}