pkger/pkgs/current.go

25 lines
394 B
Go
Raw Normal View History

2019-07-31 00:21:26 +03:00
package pkgs
import (
"os"
"path/filepath"
"github.com/gobuffalo/here"
)
func Pkg(p string) (here.Info, error) {
return here.Cache(p, here.Package)
}
func Dir(p string) (here.Info, error) {
return here.Cache(p, here.Dir)
}
func Current() (here.Info, error) {
return Dir(".")
}
func Stat(info here.Info, p string) (os.FileInfo, error) {
return os.Stat(filepath.Join(info.Dir, p))
}