filediff-0.1.0.0: Diff and patch module

Safe HaskellNone
LanguageHaskell2010

Filediff

Contents

Description

The module exposing the functionality of this package

Synopsis

basic operations

diffFiles :: FilePath -> FilePath -> IO Filediff Source

O(mn). Compute the difference between the two files (more | specifically, the minimal number of changes to make to transform the | file residing at the location specified by the first | parameter into the second). Throws an exception if either or both of | the parameters point to a directory, not a file. | | Files are allowed to not exist at either or both of the parameters.

diffDirectories :: FilePath -> FilePath -> IO Diff Source

Compute the difference between the two directories (more | specifically, the minimal number of changes to make to transform the | directory residing at the location specified by the first | parameter into the second). Throws an exception if either or both of | the parameters point to a file, not a directory.

applyToFile :: Filediff -> FilePath -> IO [Line] Source

O(n). Apply a diff to a directory or file

applyToDirectory :: Diff -> FilePath -> IO () Source

True upon success; False upon failure