diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-10 15:54:02 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-10 16:06:36 -0400 |
commit | dce9c2e0804d2c94f46dcac8c9884766bb22dcc7 (patch) | |
tree | 0533ee4b599a6e1f83f31dd00f628ee866c91285 /Locations.hs | |
parent | 7880dc16fef81bb6a8812c6b4e9578a6ae2b2879 (diff) |
convert GitRepo to struct with constructor
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Locations.hs b/Locations.hs new file mode 100644 index 000000000..7273797ef --- /dev/null +++ b/Locations.hs @@ -0,0 +1,18 @@ +{- git-annex file locations + -} + +module Locations where + +import GitRepo + +{- An annexed file's content is stored somewhere under .git/annex/ -} +annexDir :: GitRepo -> String -> 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 ++ "/" |