Documentation
¶
Index ¶
- Variables
- type Dir
- type File
- func (f *File) Close() (err error)
- func (f *File) Create(mode os.FileMode) (err error)
- func (f *File) Duplicate(src *File) error
- func (f *File) Init(dir, name string)
- func (f *File) IsNewer(old *File) bool
- func (f *File) Open(flag int) error
- func (f *File) Path() string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) ReadString() (raw string, err error)
- func (f *File) Stat() (changed bool, err error)
- func (f *File) Write(p []byte) (n int, err error)
- type Tree
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDirectoryCollision occurs when merging directories with the name subdir names ErrDirectoryCollision = errors.New("tried to merge directories with identically named subdirs") // ErrFileCollision occurs when merging directories with the name file names ErrFileCollision = errors.New("tried to merge firectories with identically named files") )
View Source
var ( // ErrAlreadyClosed is returned when a file is closed twice ErrAlreadyClosed = errors.New("file was already closed") // ErrFileOpen is returned when a file is opened twice ErrFileOpen = errors.New("file is already opened") // ErrNotOpen is returned when a file is accessed while closed ErrNotOpen = errors.New("fie has not been opened") )
View Source
var ErrMissingDir = errors.New("subdir not found")
ErrMissingDir occurs when requesting a subtree for a non-existent directory
Functions ¶
This section is empty.
Types ¶
type Dir ¶
Dir represents a generic directory on Disk
type File ¶
type File struct {
Name string
Ext string
Dir string
Mode fs.FileMode
Modified time.Time
// contains filtered or unexported fields
}
File is a generic representation of a File on disk
func (*File) ReadString ¶
ReadString reads the entire contents of this file as a string
type Tree ¶
type Tree struct {
Root *Dir
}
Tree represents a generic file tree on disk
Click to show internal directories.
Click to hide internal directories.