Function write_diff

Source
pub async fn write_diff<I1, I2, O>(
    old: I1,
    new: I2,
    output: Option<O>,
    use_color: bool,
) -> Result<()>
where I1: AsRef<Path>, I2: AsRef<Path>, O: AsRef<Path>,
Expand description

Output diff between two files string to stdout/file.

  • output: If not provided, then stdout.
  • use_color: ANSI color diff. (red & green)

§Errors

  • Not found extension.
  • Fail to read.
  • Fail to write.

§Note

extension

  • hkx -> Hexdump string
  • else -> Any encode string