Versions in this module Expand all Collapse all v0 v0.0.2 Mar 26, 2021 v0.0.1 Mar 6, 2021 Changes in this version + const DirCreate + const OpCreate + const OpCreateAbs + const OpExists + const OpOpen + const OpStat + var Error pathError + func CreateIf(create Creatable, s string) (err error) + func SelectAll(_ Pather) bool + func UseAsScanner(r ReaderCreator, fn func(*bufio.Scanner) error) (err error) + func UseReader(r ReaderCreator, fn func(io.Reader) error) (err error) + func UseWriter(w WriterCreator, fn func(io.Writer) error) (err error) + type BufferedCreator struct + func (b BufferedCreator) CreateReader() (reader io.ReadCloser, err error) + type BufferedReadCloser struct + func (b *BufferedReadCloser) Read(p []byte) (n int, err error) + type ByModTime []Valid + func (b ByModTime) Len() int + func (b ByModTime) Less(i, j int) bool + func (b ByModTime) Swap(i, j int) + type CloseError struct + func (ce CloseError) Error() (s string) + type Convertable interface + ToDir func() (Dir, error) + ToFile func() (File, error) + ToValid func() (Valid, error) + ToValidFile func() (ValidFile, error) + type Creatable interface + Create func(Path) error + SetPath func(Path) + type Dir struct + func Cwd() (d Dir, err error) + func TempDir(prefix string) (d Dir, err error) + func TempDirIn(dir, prefix string) (d Dir, err error) + func (d *Dir) Set(s string) (err error) + func (d *Dir) UnmarshalJSON(b []byte) (err error) + func (d Dir) Chdir() (err error) + func (d Dir) ReadDir() (fi []os.FileInfo, err error) + func (d Dir) Remove() (err error) + type EmptyDir struct + func (_ EmptyDir) Create(p Path) (err error) + func (e *EmptyDir) Set(s string) (err error) + func (e *EmptyDir) SetPath(p Path) + func (e *EmptyDir) UnmarshalJSON(b []byte) (err error) + type EnumFilter func(int, Pather) (bool, error) + type ErrorFmt interface + Fmt func(Path) string + type Extension string + func (e Extension) Check(v ValidFile) (b bool) + func (e Extension) Files(num int) (w WithExtension) + func (e Extension) MustHave(v ValidFile) (err error) + type File struct + func (f File) IfExists() (opt *ValidFile, err error) + func (f File) ToValid() (vf ValidFile, err error) + type Filter func(Pather) (bool, error) + type Filterer interface + Filter func(Pather) (bool, error) + type FiltererPayload struct + func (f *FiltererPayload) UnmarshalJSON(b []byte) (err error) + type Filters []Filter + type From interface + FromPath func(p Pather) error + type Glob func() ([]Valid, error) + type GlobPattern struct + func (g *GlobPattern) UnmarshalJSON(b []byte) (err error) + func (g GlobPattern) Glob() (gr GlobResult, err error) + type GlobPatterns map[string]GlobPattern + func (g GlobPatterns) Get(key string, ext Extension) (f []ValidFile, err error) + type GlobResult struct + func (g GlobResult) Into(in IndexedFrom) (err error) + func (g GlobResult) Len() (n int) + type Globber struct + Filterer FiltererPayload + Pattern string + Valid Valid + func (g Globber) Glob() (v []Valid, err error) + type IndexedFrom interface + GetFrom func(ii int) From + type Like interface + type MustHaveExtension Extension + type NotExists string + const DoesNotExist + func (e NotExists) Error() (s string) + type Operations interface + Abs func() (Like, error) + Exists func() (bool, error) + Extension func() Extension + Glob func() ([]Valid, error) + Join func(...string) Like + type Parts struct + func (d *Parts) UnmarshalJSON(b []byte) (err error) + func (p Parts) ToPath() (pp Path) + type Path struct + func Joined(args ...string) Path + func New(p string) Path + func (p *Path) Set(s string) (err error) + func (p *Path) UnmarshalJSON(b []byte) (err error) + func (p Path) Abs() (l Like, err error) + func (p Path) AddExtension(ext string) (l Like) + func (p Path) AsPath() (rp Path) + func (p Path) Base() (l Like) + func (p Path) Create() (of *os.File, err error) + func (p Path) Dir() (pp Path) + func (p Path) Exists() (b bool, err error) + func (p Path) Extension() (ext Extension) + func (p Path) Fail(efmt ErrorFmt, err error) (Err error) + func (p Path) GetPath() string + func (p Path) Glob() (v []Valid, err error) + func (p Path) Hash(h hash.Hash) + func (p Path) IfExists() (optPath *Valid, err error) + func (p Path) Into(f From) (err error) + func (p Path) Join(args ...string) (l Like) + func (p Path) Len() int + func (p Path) MarshalJSON() (b []byte, err error) + func (p Path) Mkdir() (d Dir, err error) + func (p Path) MustExist() (err error) + func (p Path) NoExtension() (l Like) + func (p Path) Remove() (err error) + func (p Path) String() string + func (p Path) ToDir() (d Dir, err error) + func (p Path) ToFile() (f File, err error) + func (p Path) ToValid() (vp Valid, err error) + func (p Path) ToValidFile() (vf ValidFile, err error) + func (p Path) Touch() (err error) + type Pather interface + AsPath func() Path + type ReaderCreator interface + CreateReader func() (r io.ReadCloser, err error) + type Retreiver struct + func NewRetreiver(dir Dir, pattern string) (r Retreiver) + func (r Retreiver) Format(args ...interface{}) (p File, err error) + func (r Retreiver) Get() (vf ValidFile, err error) + func (r Retreiver) Index(idx int) (vf ValidFile, err error) + func (r Retreiver) Key(key string) (vf ValidFile, err error) + type Scanner struct + type SelectDir struct + func (_ SelectDir) Filter(p Pather) (b bool, err error) + type SelectFile struct + func (_ SelectFile) Filter(p Pather) (b bool, err error) + type Transform func(Pather) (Pather, error) + type Transformer interface + Transform func(Like) (Like, error) + type Transforms []Transform + type Valid struct + func (v *Valid) FromPath(p Pather) (err error) + func (v *Valid) Set(s string) (err error) + func (v *Valid) UnmarshalJSON(b []byte) (err error) + func (v Valid) OlderThan(vp Valid) (b bool, err error) + func (v Valid) ToFile() (vf ValidFile, err error) + func (v Valid) YoungerThan(vp Valid) (b bool, err error) + func (vp Valid) IsDir() (b bool, err error) + func (vp Valid) ModTime() (t time.Time, err error) + func (vp Valid) Move(dir Dir) (dst Valid, err error) + func (vp Valid) Open() (of *os.File, err error) + func (vp Valid) Remove() (err error) + func (vp Valid) Rename(target fmt.Stringer) (dst Valid, err error) + func (vp Valid) Stat() (fi os.FileInfo, err error) + type ValidFile struct + func (v *ValidFile) FromPath(p Pather) (err error) + func (v ValidFile) Use(fn func(*os.File) error) (err error) + func (vf ValidFile) LoadJson(val interface{}) (err error) + func (vf ValidFile) Move(d Dir) (vfm ValidFile, err error) + func (vf ValidFile) ReadAll() (b []byte, err error) + func (vf ValidFile) Scanner() (s Scanner, err error) + func (vf ValidFile) ToFile() (f File) + type ValidFiles []ValidFile + func (v ValidFiles) GetFrom(ii int) (f From) + type Validator interface + Validate func() error + type Valids []Valid + func (v Valids) Filter(filt Filterer) (filtered Valids, err error) + func (v Valids) Transform(trans Transformer) (transformed Valids, err error) + type WithExtension struct + func (w WithExtension) Files() (files []ValidFile) + func (w WithExtension) GetFrom(ii int) (f From) + type WriterCreator interface + CreateWriter func() (io.WriteCloser, error) + type WrongExtension struct + Expected Extension + File ValidFile + Got Extension + func (e WrongExtension) Error() (s string)