2012-06-20 20:07:14 +00:00
|
|
|
{- KeySource data type
|
|
|
|
-
|
2015-01-21 16:50:09 +00:00
|
|
|
- Copyright 2012 Joey Hess <id@joeyh.name>
|
2012-06-20 20:07:14 +00:00
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Types.KeySource where
|
|
|
|
|
2013-02-14 20:54:36 +00:00
|
|
|
import Utility.InodeCache
|
|
|
|
|
2012-06-20 20:07:14 +00:00
|
|
|
{- When content is in the process of being added to the annex,
|
|
|
|
- and a Key generated from it, this data type is used.
|
|
|
|
-
|
|
|
|
- The contentLocation may be different from the filename
|
|
|
|
- associated with the key. For example, the add command
|
2013-02-14 18:10:36 +00:00
|
|
|
- may temporarily hard link the content into a lockdown directory
|
2012-06-20 20:07:14 +00:00
|
|
|
- for checking. The migrate command uses the content
|
2013-02-14 18:10:36 +00:00
|
|
|
- of a different Key.
|
|
|
|
-
|
2013-02-14 20:54:36 +00:00
|
|
|
- The inodeCache can be used to detect some types of modifications to
|
|
|
|
- files that may be made while they're in the process of being added.
|
2013-02-14 18:10:36 +00:00
|
|
|
-}
|
2012-06-20 20:07:14 +00:00
|
|
|
data KeySource = KeySource
|
|
|
|
{ keyFilename :: FilePath
|
|
|
|
, contentLocation :: FilePath
|
2013-02-14 20:54:36 +00:00
|
|
|
, inodeCache :: Maybe InodeCache
|
2012-06-20 20:07:14 +00:00
|
|
|
}
|
|
|
|
deriving (Show)
|