Function already_says

Source
pub fn already_says(path: &Path, content: &str) -> bool
Expand description

true when the file already holds exactly this, byte for byte.

Content rather than a modification date, because a playlist is derived from the set of tracks and not from their bytes: adding a track to an album changes what the playlist should say without touching any file the playlist already names. Comparing the text answers both questions at once, and leaves the file’s date alone when nothing changed — which matters to whatever syncs the folder afterwards.

Only regular destination files are compared, using a fixed-size buffer. Existing links/special files are not accepted as current output. As with the replacement writer, this is not a sandbox against concurrent path changes.