pub fn is_equals<P: AsRef<Path>>(source: P, target: P) -> Result<bool> {
    let source = source.as_ref();
    let target = target.as_ref();

    if !target.exists() {
        return Ok(false);
    }

    let source_metadata = source.metadata()?;
    let target_metadata = target.metadata()?;

    if source_metadata.len() != target_metadata.len() ||
       source_metadata.modified()? != target_metadata.modified()?                                                                                                                                     {
        Ok(false)
    } else  {
        have_same_contents(source, target)
    }
}
/// Return true if two files are equals.
///
/// Files are considered equals if have same len, same modification time
/// and same contents.
Return true if two files are equals.
Files are considered equals if have same len, same modification time
and same contents.
Return true if two files are equals . Files are considered equals if have same len same modification time and same contents .
pub fn is_equals<P: AsRef<Path>>(source: P, target: P) -> Result<bool> {
    let source = source.as_ref();
    let target = target.as_ref();
    if !target.exists() {
        return Ok(false);
    }
    let source_metadata = source.metadata()?;
    let target_metadata = target.metadata()?;
    if source_metadata.len() != target_metadata.len() ||
       source_metadata.modified()? != target_metadata.modified()?                                                                                                                                     {
        Ok(false)
    } else  {
        have_same_contents(source, target)
    }
}
pub fn is_equals < P : AsRef < Path > > ( source : P , target : P ) -> Result < bool > { let source = source . as_ref ( ) ; let target = target . as_ref ( ) ; if ! target . exists ( ) { return Ok ( false ) ; } let source_metadata = source . metadata ( ) ? ; let target_metadata = target . metadata ( ) ? ; if source_metadata . len ( ) != target_metadata . len ( ) || source_metadata . modified ( ) ? != target_metadata . modified ( ) ? { Ok ( false ) } else { have_same_contents ( source , target ) } }
Return true if two files are equals.
Return true if two files are equals .
source
P
target
P