fs

package
v0.0.0-...-dd86992 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTINUE_TREE_SYMBOL = "├"
	BREAK_TREE_SYMBOL    = "└"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File descriptor

func NewFile

func NewFile(name string, path string, level int) File

Creates a new file

type Folder

type Folder struct {
	// contains filtered or unexported fields
}

Folder descriptor

func NewFolder

func NewFolder(name string, path string, level int, isRoot bool) *Folder

Creates a new folder

func (*Folder) AddFile

func (folder *Folder) AddFile(f File)

Adds file to the current folder

func (*Folder) AddFolder

func (folder *Folder) AddFolder(f Folder)

Adds a folder to the current one

func (Folder) GetDepth

func (folder Folder) GetDepth() int

Retrieves folder's depth level

func (Folder) GetPath

func (folder Folder) GetPath() string

Retrieves folder's path

func (Folder) Tree

func (folder Folder) Tree() string

Returns tree folder representation without giving the initial recursion symbol

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL