filetree

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package filetree provides directory tree walking functionality for with_filetree operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item added in v0.5.0

type Item struct {
	Src   string `yaml:"src"`
	Path  string `yaml:"path"`
	Name  string `yaml:"name"`
	State string `yaml:"state"`
	IsDir bool   `yaml:"is_dir"`
}

Item represents a single item in a file tree.

type Walker

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

Walker handles file tree operations.

func NewWalker

func NewWalker(pathExpander *pathutil.PathExpander) *Walker

NewWalker creates a new file tree walker.

func (*Walker) GetFileTree

func (w *Walker) GetFileTree(path string, currentDir string, context map[string]interface{}) ([]Item, error)

GetFileTree walks a directory tree and returns all files and directories.

Jump to

Keyboard shortcuts

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