Skip to main content

Module file_loader

Module file_loader 

Source
Expand description

Filesystem scanning — discovers .md files in a vault and computes slugs, titles, and content hashes for incremental sync.

Structs§

ScannedFile
A markdown file discovered during a vault scan.

Functions§

content_hash
Compute SHA-256 hex digest of a string.
diff_scan
Diff scanned files against existing DB hashes. Returns (new_or_changed files, deleted slugs).
sanitize_filename
Sanitize a page title for use as a filename (without extension).
scan_folder
Recursively scan a folder for .md files.
scan_single_file
Scan a single file and return a ScannedFile if it’s a valid .md file.
slug_from_path
Derive a slug from a relative file path. “notes/My Page.md” -> “notes/my-page”
title_from_path
Derive a page title from a relative file path. “notes/My Page.md” -> “My Page”