add: Display progress meter when hashing files.

* add: Display progress meter when hashing files.
* add: Support --json-progress option.
This commit is contained in:
Joey Hess 2019-06-25 13:12:47 -04:00
parent 554b307931
commit 42c386fc47
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 35 additions and 6 deletions

View file

@ -13,6 +13,7 @@
module Utility.InodeCache (
InodeCache,
InodeComparisonType(..),
inodeCacheFileSize,
compareStrong,
compareWeak,
@ -58,6 +59,9 @@ data InodeCachePrim = InodeCachePrim FileID FileSize MTime
newtype InodeCache = InodeCache InodeCachePrim
deriving (Show)
inodeCacheFileSize :: InodeCache -> FileSize
inodeCacheFileSize (InodeCache (InodeCachePrim _ sz _)) = sz
{- Inode caches can be compared in two different ways, either weakly
- or strongly. -}
data InodeComparisonType = Weakly | Strongly