Filehound
Flexible and fluent interface for searching the file system. Implementation of FileHound in Go.
Installation
go get github.com/nspragg/go-filehound/filehound
Usage
The example below prints all of the files in a directory that have the .json
file extension:
import filehound
fh := filehound.New()
fh.Query(Paths("/tmp"))
fh.Query(Ext("json"))
files := fh.Find()
fmt.Println(files)
Documentation
For more examples and API details, see API documentation
Build
go build github.com/nspragg/go-filehound/filehound
Test
go test github.com/nspragg/go-filehound/filehound
To generate a test coverage report:
go test -coverprofile=coverage.out github.com/nspragg/go-filehound/filehound
go tool cover -html=coverage.out