Skip to main content

files_have_same_bytes

Function files_have_same_bytes 

Source
pub fn files_have_same_bytes(one: &Path, other: &Path) -> Result<bool>
Expand description

Whether two files hold the same bytes.

Streamed in blocks rather than read whole, since a caller comparing game content is comparing textures and movies that run to hundreds of megabytes.

Sizes are not consulted. A caller that can cheaply rule a pair out on length should do so before calling this; what this answers is the exact question.

ยงErrors

Whatever stopped either file being opened or read.