summaryrefslogtreecommitdiff
path: root/Locations.hs
blob: 50f94a727de037b79acd629c3e5adbb079a7f248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{- git-annex file locations
 -}

module Locations where

import Types
import GitRepo

{- An annexed file's content is stored somewhere under .git/annex/ -}
annexDir :: GitRepo -> Key -> IO FilePath
annexDir repo key = do
	dir <- gitDir repo
	return $ dir ++ "/annex/" ++ key

{- Long-term state is stored in files inside the .git-annex directory
 - in the git repository. -}
stateLoc = ".git-annex"
gitStateDir :: GitRepo -> FilePath
gitStateDir repo = (top repo) ++ "/" ++ stateLoc ++ "/"