2011-03-15 21:47:29 +00:00
|
|
|
{- git-annex Key data type
|
|
|
|
-
|
2017-02-24 15:17:07 +00:00
|
|
|
- Copyright 2011-2017 Joey Hess <id@joeyh.name>
|
2011-03-15 21:47:29 +00:00
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
2017-02-24 17:42:30 +00:00
|
|
|
module Types.Key where
|
2011-03-15 21:47:29 +00:00
|
|
|
|
2011-03-16 01:34:13 +00:00
|
|
|
import System.Posix.Types
|
2011-10-04 02:24:57 +00:00
|
|
|
|
2013-07-04 06:36:02 +00:00
|
|
|
{- A Key has a unique name, which is derived from a particular backend,
|
2011-03-16 01:34:13 +00:00
|
|
|
- and may contain other optional metadata. -}
|
2013-07-04 06:45:46 +00:00
|
|
|
data Key = Key
|
|
|
|
{ keyName :: String
|
|
|
|
, keyBackendName :: String
|
|
|
|
, keySize :: Maybe Integer
|
|
|
|
, keyMtime :: Maybe EpochTime
|
2014-07-24 17:36:23 +00:00
|
|
|
, keyChunkSize :: Maybe Integer
|
|
|
|
, keyChunkNum :: Maybe Integer
|
2013-07-04 06:45:46 +00:00
|
|
|
} deriving (Eq, Ord, Read, Show)
|
2011-03-15 21:47:29 +00:00
|
|
|
|
2013-07-04 06:36:02 +00:00
|
|
|
{- A filename may be associated with a Key. -}
|
|
|
|
type AssociatedFile = Maybe FilePath
|