nspragg / go-filehound

Find files the easy way

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filehound

GoDoc Build Status Coverage Status Go Report Card

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

About

Find files the easy way

License:MIT License


Languages

Language:Go 100.0%