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
|
|
|
-
|
2019-03-13 19:48:14 +00:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2012-06-20 20:07:14 +00:00
|
|
|
-}
|
|
|
|
|
|
|
|
module Types.KeySource where
|
|
|
|
|
2013-02-14 20:54:36 +00:00
|
|
|
import Utility.InodeCache
|
2020-02-21 13:34:59 +00:00
|
|
|
import System.FilePath.ByteString (RawFilePath)
|
2013-02-14 20:54:36 +00:00
|
|
|
|
2015-12-22 17:23:33 +00:00
|
|
|
{- When content is in the process of being ingested into the annex,
|
2012-06-20 20:07:14 +00:00
|
|
|
- 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
|
2015-12-22 17:23:33 +00:00
|
|
|
- files that may be made while they're in the process of being ingested.
|
2013-02-14 18:10:36 +00:00
|
|
|
-}
|
2012-06-20 20:07:14 +00:00
|
|
|
data KeySource = KeySource
|
2020-02-21 13:34:59 +00:00
|
|
|
{ keyFilename :: RawFilePath
|
|
|
|
, contentLocation :: RawFilePath
|
2013-02-14 20:54:36 +00:00
|
|
|
, inodeCache :: Maybe InodeCache
|
2012-06-20 20:07:14 +00:00
|
|
|
}
|
|
|
|
deriving (Show)
|