Documentation
¶
Index ¶
- Constants
- type File
- type FileSystemObject
- type Folder
- func (f *Folder) AddObject(obj FileSystemObject) *Folder
- func (f *Folder) CalculateTotalSize() int
- func (f *Folder) FindObject(name string) FileSystemObject
- func (f *Folder) GetName() string
- func (f *Folder) GetObjectType() string
- func (f *Folder) GetParent() *Folder
- func (f *Folder) SetName(name string)
- func (f *Folder) SetParent(parent *Folder)
Constants ¶
View Source
const ( CommandChangeDirectory = "cd" CommandList = "ls" )
View Source
const ( ObjectTypeFolder = "FOLDER" ObjectTypeFile = "FILE" )
View Source
const (
Directory = "dir"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
func (*File) GetObjectType ¶
type FileSystemObject ¶
type Folder ¶
type Folder struct {
Name string
Children []FileSystemObject
TotalSize int
// contains filtered or unexported fields
}
func (*Folder) AddObject ¶
func (f *Folder) AddObject(obj FileSystemObject) *Folder
func (*Folder) CalculateTotalSize ¶
func (*Folder) FindObject ¶
func (f *Folder) FindObject(name string) FileSystemObject
func (*Folder) GetObjectType ¶
Click to show internal directories.
Click to hide internal directories.