Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsDir = errors.New("is a directory")
View Source
var ErrIsFile = errors.New("is a file")
View Source
var ErrIsNotRegular = errors.New("is not a regular file")
Functions ¶
Types ¶
type Dir ¶
type Dir interface { Path() string Parent() Dir Up(level int) Dir Name() string Remove() error RemoveAll() error Exists() (bool, error) Rename(string) error Join(...string) string // like os.File.ReadDir Files() ([]File, error) Dirs() ([]Dir, error) // like filepath.Walk Create() error CreateAll() error Walk(func(File) error, func(Dir) error) error }
type File ¶
type File interface { Name() string Path() string Parent() Dir Remove() error Extension() string BareName() string Exists() (bool, error) ReadAll() ([]byte, error) WriteAll([]byte) error Read(func(io.Reader) error) error // Write will create the file if it does not exist Write(func(io.Writer) error) error Rename(string) error MimeType() string }
Click to show internal directories.
Click to hide internal directories.