formatter

package
v0.0.0-...-282f259 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 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 FormatMode

type FormatMode uint8

//////////////////////////////////////////////////////////////////////

const (
	// Implemented
	ShowFullPathMode FormatMode = 1 << iota
	ShowPrefixMode
	ShowDecorationMode
	ShowSymlinkTargetMode
	ShowHashChecksumMode

	// Future features
	ShowUserGroupMode
	ShowFilePermissionMode
	ShowFileSizeMode
)

type Formatter

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

//////////////////////////////////////////////////////////////////////

func NewFormatter

func NewFormatter() *Formatter

Constructor

func (*Formatter) NewReader

func (f *Formatter) NewReader(in <-chan *node.Node) io.Reader

Reader wrapper

func (*Formatter) Next

func (f *Formatter) Next() (string, error)

func (*Formatter) Read

func (f *Formatter) Read(p []byte) (int, error)

Implements io.Reader interface

func (*Formatter) SetShowDecoration

func (f *Formatter) SetShowDecoration(cond bool)

func (*Formatter) SetShowFullPath

func (f *Formatter) SetShowFullPath(cond bool)

Setters

func (*Formatter) SetShowHash

func (f *Formatter) SetShowHash(cond bool)

Display SHA1 checksum for regular file

func (*Formatter) SetShowPrefix

func (f *Formatter) SetShowPrefix(cond bool)

func (*Formatter) SetShowSymlinkTarget

func (f *Formatter) SetShowSymlinkTarget(cond bool)

func (*Formatter) ShowDecoration

func (f *Formatter) ShowDecoration() bool

func (*Formatter) ShowFullPath

func (f *Formatter) ShowFullPath() bool

Getters

func (*Formatter) ShowHash

func (f *Formatter) ShowHash() bool

func (*Formatter) ShowPrefix

func (f *Formatter) ShowPrefix() bool

func (*Formatter) ShowSymlinkTarget

func (f *Formatter) ShowSymlinkTarget() bool

func (*Formatter) String

func (f *Formatter) String() string

Jump to

Keyboard shortcuts

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