fsprinter

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

type Printer struct {
	Templates

	// PadDir indicates how much padding should be applied to the directory content compared to the Dir template that is embedding it
	PadDir string

	// PadFile indicates how much padding should be applied to every file line compared to the Dir template that is embedding it
	PadFile string
}

func New

func New() *Printer

func NewHTML

func NewHTML() *Printer

func (*Printer) Fprint

func (p *Printer) Fprint(wr io.Writer, fsys fs.ReadOnly) (err error)

func (*Printer) Print

func (p *Printer) Print(fsys fs.ReadOnly) error

type Templates

type Templates struct {
	Root string
	Dir  string
	File string
}

Templates define how the dirs and files are printed They need the following placeholders: for the name: [@name@] (Dir and File template) for the children: [@children@] (Root and Dir template)

Jump to

Keyboard shortcuts

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