2021-10-17 18:39:49 +00:00
|
|
|
module GHCup.Utils.Prelude.Posix where
|
|
|
|
|
|
|
|
import System.Directory
|
|
|
|
import System.Posix.Files
|
|
|
|
|
|
|
|
|
|
|
|
isWindows, isNotWindows :: Bool
|
|
|
|
isWindows = False
|
|
|
|
isNotWindows = not isWindows
|
|
|
|
|
|
|
|
|
|
|
|
moveFile :: FilePath -> FilePath -> IO ()
|
|
|
|
moveFile = rename
|
|
|
|
|
|
|
|
|
|
|
|
moveFilePortable :: FilePath -> FilePath -> IO ()
|
|
|
|
moveFilePortable from to = do
|
|
|
|
copyFile from to
|
|
|
|
removeFile from
|
2022-05-12 15:58:40 +00:00
|
|
|
|