mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
update example for gres
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
@ -57,5 +57,6 @@ func (f *File) MarshalJSON() ([]byte, error) {
|
||||
"name": f.Name(),
|
||||
"size": info.Size(),
|
||||
"time": info.ModTime(),
|
||||
"file": !info.IsDir(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user