elvefs

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

type Dir struct {
	Name    string
	Parent  *Dir
	SubDirs []*Dir
	Files   []*File
}

func (*Dir) TotalSize

func (d *Dir) TotalSize() int

type File

type File struct {
	Name string
	Size int
}

type FileInfo

type FileInfo struct {
	Path      string
	Type      FileType
	TotalSize int
}

type FileType

type FileType string
const (
	TypeDir  FileType = "dir"
	TypeFile FileType = "file"
)

type Fs

type Fs struct {
	Root *Dir
	// contains filtered or unexported fields
}

func New

func New() *Fs

func (*Fs) Process

func (fs *Fs) Process(lines []string) error

func (*Fs) Used

func (fs *Fs) Used() int

func (*Fs) Walk

func (fs *Fs) Walk(cb func(fi FileInfo))

Jump to

Keyboard shortcuts

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