fs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package fs is a filesystem Source: it walks a path (file or directory) and yields each regular, non-hidden file as a SourceItem whose content type is detected from the extension. Hidden entries (names beginning with ".") are skipped so VCS and editor metadata never gets ingested. fs does not filter by whether content is supported — the Extractor decides that downstream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct{}

Source walks the filesystem. Its zero value is ready to use.

func NewSource

func NewSource() Source

NewSource returns a filesystem Source.

func (Source) Walk

func (Source) Walk(ctx context.Context, root string, fn func(app.SourceItem) error) error

Walk yields every regular, non-hidden file under root, in lexical order. It stops and returns the first error from fn, a read error, or ctx cancellation.

Jump to

Keyboard shortcuts

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