Function looks_like_a_report

Source
pub fn looks_like_a_report(path: &Path) -> bool
Expand description

true when a file announces itself as a report, on a glance at its head.

A scan walks past every file in the library and must not parse each .json it meets — a cover-art sidecar, a player’s own database, anything. The format marker sits in the first object of the file, so half a kilobyte settles it without reading a report that may hold thousands of entries.