vfs

package
v0.0.0-...-7b96089 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryNode

type DirectoryNode struct {
	NodeBase
	// contains filtered or unexported fields
}

A DirectoryNode is a directory in the virtual file system.

func NewDirectoryNode

func NewDirectoryNode(fs FS, path string, name string) *DirectoryNode

NewDirectoryNode creates a new DirectoryNode with the specified path. The key of the DirectoryNode is set to the lowercase version of the path.

func (*DirectoryNode) Resolve

func (dn *DirectoryNode) Resolve(name string) FsNode

func (*DirectoryNode) Sync

func (dn *DirectoryNode) Sync(filterFn func(path string) bool) error

Sync synchronizes the DirectoryNode with the underlying filesystem. It scans the directory and updates the children nodes to reflect the current state of the filesystem. Any nodes that no longer exist in the filesystem are removed.

type FS

type FS interface {
	fs.FS
}

type FileNode

type FileNode struct {
	NodeBase
}

func NewFileNode

func NewFileNode(fs FS, path string) *FileNode

type FsNode

type FsNode interface {
	psi.Node

	Name() string
	Path() string
}

A FsNode is a node in the virtual file system.

type NodeBase

type NodeBase struct {
	psi.NodeBase
	// contains filtered or unexported fields
}

func (*NodeBase) Ast

func (nb *NodeBase) Ast() dst.Node

func (*NodeBase) Comments

func (nb *NodeBase) Comments() []string

func (*NodeBase) IsContainer

func (nb *NodeBase) IsContainer() bool

func (*NodeBase) IsLeaf

func (nb *NodeBase) IsLeaf() bool

func (*NodeBase) Name

func (nb *NodeBase) Name() string

func (*NodeBase) Path

func (nb *NodeBase) Path() string

func (*NodeBase) PsiNodeName

func (nb *NodeBase) PsiNodeName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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