Documentation
¶
Index ¶
- type Child
- type Directory
- func (d *Directory) AddDirectory(dir *Directory) *Directory
- func (d *Directory) AddDirectoryName(s string) *Directory
- func (d *Directory) AddFile(f *File)
- func (d *Directory) AllChildren() (c []Child)
- func (d *Directory) Parents() (s []*Directory)
- func (d *Directory) Path() string
- func (d *Directory) String() string
- func (d *Directory) WithParent(parent *Directory) *Directory
- func (d *Directory) Write() error
- func (d *Directory) WriteAll() error
- type File
- func (f *File) FullName() string
- func (f *File) Parents() (s []*Directory)
- func (f *File) Path() string
- func (f *File) Read() (err error)
- func (f *File) String() string
- func (f *File) WithContent(content []byte) *File
- func (f *File) WithParent(parent *Directory) *File
- func (f *File) Write() error
- func (f *File) WritePerm(perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
Directory ...
func CurrentDirectory ¶
CurrentDirectory returns a pointer to the current directory
func NewDirectory ¶
NewDirectory returns a pointer to a directory object with a specified name
func (*Directory) AddDirectory ¶
AddDirectory adds a child directory to a directory
func (*Directory) AddDirectoryName ¶
AddDirectoryName adds a child directory with a specified name to a directory
func (*Directory) AllChildren ¶
AllChildren recurses the a directories children and returns a slice of children
func (*Directory) WithParent ¶ added in v0.1.3
WithParent returns a pointer to a Directory from an existing Directory with a specified parent
type File ¶
File ...
func NewFilePath ¶ added in v0.1.2
NewFilePath returns a pointer to a File from a full filepath
func (*File) WithContent ¶ added in v0.1.2
WithContent returns a pointer to a File from an existing file with specified contents
func (*File) WithParent ¶ added in v0.1.2
WithParent returns a pointer to a File from an existing file with a specified parent