vfs

package
v19.10.22+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT, 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 Dirent

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

func (Dirent) IsDir

func (fm Dirent) IsDir() bool

func (Dirent) IsRegular

func (fm Dirent) IsRegular() bool
func (fm Dirent) IsSymlink() bool

func (Dirent) IsValid

func (fm Dirent) IsValid() bool

func (Dirent) Mode

func (fm Dirent) Mode() os.FileMode

func (*Dirent) Name

func (de *Dirent) Name() string

type FS

type FS struct{ Node }

func New

func New() *FS

func (*FS) Invalidate

func (fs *FS) Invalidate(path string)

func (*FS) IsDir

func (fs *FS) IsDir(path string) bool

func (*FS) IsFile

func (fs *FS) IsFile(path string) bool

func (*FS) Memo

func (fs *FS) Memo(path string) (*Node, *mgutil.Memo, error)

func (*FS) ReadDir

func (fs *FS) ReadDir(path string) ([]os.FileInfo, error)

func (*FS) ReadMemo

func (fs *FS) ReadMemo(path string, k interface{}, new func() interface{}) interface{}

func (*FS) Scan

func (fs *FS) Scan(path string, so ScanOptions)

func (*FS) Stat

func (fs *FS) Stat(path string) (*Node, os.FileInfo, error)

type FileInfo

type FileInfo struct {
	Node *Node
	// contains filtered or unexported fields
}

func (*FileInfo) IsDir

func (fi *FileInfo) IsDir() bool

func (*FileInfo) ModTime

func (fi *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (fi *FileInfo) Mode() os.FileMode

func (*FileInfo) Name

func (fi *FileInfo) Name() string

func (*FileInfo) Size

func (fi *FileInfo) Size() int64

func (*FileInfo) Sys

func (fi *FileInfo) Sys() interface{}

type Node

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

func (*Node) Branches

func (nd *Node) Branches(f func(nd *Node))

func (*Node) Children

func (nd *Node) Children() *NodeList

func (*Node) Invalidate

func (nd *Node) Invalidate()

func (*Node) IsBranch

func (nd *Node) IsBranch() bool

func (*Node) IsDescendant

func (nd *Node) IsDescendant(ancestor *Node) bool

func (*Node) IsDir

func (nd *Node) IsDir() bool

func (*Node) IsFile

func (nd *Node) IsFile() bool

func (*Node) IsLeaf

func (nd *Node) IsLeaf() bool

func (*Node) IsRoot

func (nd *Node) IsRoot() bool

func (*Node) Locate

func (nd *Node) Locate(name string) (*Node, os.FileInfo, error)

func (*Node) Ls

func (nd *Node) Ls() *NodeList

func (*Node) Memo

func (nd *Node) Memo() (*mgutil.Memo, error)

func (*Node) Name

func (nd *Node) Name() string

func (*Node) Parent

func (nd *Node) Parent() *Node

func (*Node) Path

func (nd *Node) Path() string

func (*Node) Peek

func (nd *Node) Peek(path string) *Node

func (*Node) Poke

func (nd *Node) Poke(path string) *Node

func (*Node) Print

func (nd *Node) Print(w io.Writer)

func (*Node) PrintWithFilter

func (nd *Node) PrintWithFilter(w io.Writer, filter func(*Node) string)

func (*Node) ReadDir

func (nd *Node) ReadDir() ([]os.FileInfo, error)

func (*Node) ReadMemo

func (nd *Node) ReadMemo(k interface{}, new func() interface{}) interface{}

func (*Node) Stat

func (nd *Node) Stat() (os.FileInfo, error)

func (*Node) String

func (nd *Node) String() string

type NodeList

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

func (*NodeList) Add

func (n *NodeList) Add(nd *Node) *NodeList

func (*NodeList) Copy

func (n *NodeList) Copy() *NodeList

func (*NodeList) Filter

func (n *NodeList) Filter(f func(nd *Node) bool) *NodeList

func (*NodeList) Find

func (n *NodeList) Find(name string) (index int, c *Node)

func (*NodeList) Index

func (n *NodeList) Index(nd *Node) (index int)

func (*NodeList) Len

func (n *NodeList) Len() int

func (*NodeList) Node

func (n *NodeList) Node(name string) *Node

func (*NodeList) Nodes

func (n *NodeList) Nodes() []*Node

func (*NodeList) Some

func (n *NodeList) Some(f func(nd *Node) bool) bool

func (*NodeList) Sorted

func (n *NodeList) Sorted() *NodeList

type ScanOptions

type ScanOptions struct {
	Filter   func(de *Dirent) bool
	Dirs     func(nd *Node)
	MaxDepth int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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