git-annex/Types/Key.hs

25 lines
615 B
Haskell
Raw Normal View History

2011-03-15 21:47:29 +00:00
{- git-annex Key data type
-
- 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
import System.Posix.Types
2013-07-04 06:36:02 +00:00
{- A Key has a unique name, which is derived from a particular backend,
- 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
, 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