summaryrefslogtreecommitdiff
path: root/CopyFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-07-05 20:24:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-07-05 20:24:10 -0400
commitc98b5cf36e785cdf2c971eaf9b0329db06b68ef8 (patch)
tree9f7e69b1a57bccdb0ef446035d6579fdd3938fe1 /CopyFile.hs
parent6040d8aed17de582f5d5c179040e29c599315e31 (diff)
rename
Diffstat (limited to 'CopyFile.hs')
-rw-r--r--CopyFile.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/CopyFile.hs b/CopyFile.hs
deleted file mode 100644
index b08ede3c8..000000000
--- a/CopyFile.hs
+++ /dev/null
@@ -1,29 +0,0 @@
-{- git-annex file copying
- -
- - Copyright 2010 Joey Hess <joey@kitenet.net>
- -
- - Licensed under the GNU GPL version 3 or higher.
- -}
-
-module CopyFile (copyFile) where
-
-import System.Directory (doesFileExist, removeFile)
-
-import Utility
-import qualified SysConfig
-
-{- The cp command is used, because I hate reinventing the wheel,
- - and because this allows easy access to features like cp --reflink. -}
-copyFile :: FilePath -> FilePath -> IO Bool
-copyFile src dest = do
- whenM (doesFileExist dest) $
- removeFile dest
- boolSystem "cp" [params, File src, File dest]
- where
- params = if SysConfig.cp_reflink_auto
- then Params "--reflink=auto"
- else if SysConfig.cp_a
- then Params "-a"
- else if SysConfig.cp_p
- then Params "-p"
- else Params ""