package
0.0.0-20151215094434-9aa9c3bf18f3
Repository: https://github.com/itshosted/mcore.git
Documentation: pkg.go.dev
# README
filesmatch - Recursive read dir by glob pattern
http://golang.org/pkg/path/filepath/#Match
package main
import (
"fmt"
"github.com/xsnews/mcore/filesmatch"
)
func main() {
f, e := filesmatch.Match("/data01/*")
if e != nil {
panic(e)
}
fmt.Println(f)
}
Example output
# ./t
map[golang:/data01/golang var:/data01/var]
TODO
- Slow because of recursive scan, patterns like /path/* should not scan /path/a/b/c/d/*
# Functions
Read files in dir by pattern.