Documentation
¶
Overview ¶
Package scanner walks directory trees to discover and parse task files.
It produces a ScanResult containing all parsed model.Task values found under a root directory, grouping tasks by their parent directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScanResult ¶
ScanResult contains the results of a directory scan
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner scans directories for markdown task files
func NewScanner ¶
NewScanner creates a new directory scanner. ignoreDirs specifies additional directory names to skip during scanning.
func (*Scanner) Scan ¶
func (s *Scanner) Scan() (*ScanResult, error)
Scan walks the directory tree and finds all markdown files with task frontmatter
func (*Scanner) ScanArchive ¶
ScanArchive walks rootDir to find directories named "archive" and parses task files within them. These tasks are returned for dependency resolution but are not included in normal scan results.
func (*Scanner) SkippedSegment ¶ added in v0.4.5
SkippedSegment reports the first segment of relPath — a directory path relative to the scanner's root — that the scanner would refuse to descend into, or "" if the whole path is scannable. Writers use it to check a destination directory against the same rules the walk applies, so a file cannot be written somewhere the scan will never look.
Segments are matched by name at any depth, matching the walk: "a/content" is skipped when "content" is ignored, just as "content" is.