remove unused functions from Utility.RawFilePath
This commit is contained in:
parent
f8bb9a8734
commit
780a379ab1
3 changed files with 1 additions and 28 deletions
|
@ -39,7 +39,6 @@ import Annex.Concurrent.Utility
|
|||
import Types.Concurrency
|
||||
import Git.Env
|
||||
import Git.Ssh
|
||||
import qualified Utility.RawFilePath as R
|
||||
import qualified Utility.OsString as OS
|
||||
import Annex.Perms
|
||||
#ifndef mingw32_HOST_OS
|
||||
|
|
|
@ -40,13 +40,12 @@ import Git.FilePath
|
|||
import qualified Git.Url as Url
|
||||
import Utility.UserInfo
|
||||
import Utility.Url.Parse
|
||||
import qualified Utility.RawFilePath as R
|
||||
import qualified Utility.OsString as OS
|
||||
|
||||
{- Finds the git repository used for the cwd, which may be in a parent
|
||||
- directory. -}
|
||||
fromCwd :: IO (Maybe Repo)
|
||||
fromCwd = R.getCurrentDirectory >>= seekUp . toOsPath
|
||||
fromCwd = getCurrentDirectory >>= seekUp
|
||||
where
|
||||
seekUp dir = do
|
||||
r <- checkForRepo dir
|
||||
|
|
|
@ -22,12 +22,8 @@ module Utility.RawFilePath (
|
|||
readSymbolicLink,
|
||||
createSymbolicLink,
|
||||
createLink,
|
||||
removeLink,
|
||||
getFileStatus,
|
||||
getSymbolicLinkStatus,
|
||||
doesPathExist,
|
||||
getCurrentDirectory,
|
||||
createDirectory,
|
||||
setFileMode,
|
||||
setOwnerAndGroup,
|
||||
rename,
|
||||
|
@ -38,18 +34,6 @@ module Utility.RawFilePath (
|
|||
#ifndef mingw32_HOST_OS
|
||||
import Utility.FileSystemEncoding (RawFilePath)
|
||||
import System.Posix.Files.ByteString
|
||||
import qualified System.Posix.Directory.ByteString as D
|
||||
|
||||
-- | Checks if a file or directory exists. Note that a dangling symlink
|
||||
-- will be false.
|
||||
doesPathExist :: RawFilePath -> IO Bool
|
||||
doesPathExist = fileExist
|
||||
|
||||
getCurrentDirectory :: IO RawFilePath
|
||||
getCurrentDirectory = D.getWorkingDirectory
|
||||
|
||||
createDirectory :: RawFilePath -> IO ()
|
||||
createDirectory p = D.createDirectory p 0o777
|
||||
|
||||
#else
|
||||
import System.PosixCompat (FileStatus, FileMode)
|
||||
|
@ -89,15 +73,6 @@ getSymbolicLinkStatus :: RawFilePath -> IO FileStatus
|
|||
getSymbolicLinkStatus p = P.getSymbolicLinkStatus . fromRawFilePath
|
||||
=<< convertToWindowsNativeNamespace p
|
||||
|
||||
doesPathExist :: RawFilePath -> IO Bool
|
||||
doesPathExist = D.doesPathExist . fromRawFilePath
|
||||
|
||||
getCurrentDirectory :: IO RawFilePath
|
||||
getCurrentDirectory = toRawFilePath <$> D.getCurrentDirectory
|
||||
|
||||
createDirectory :: RawFilePath -> IO ()
|
||||
createDirectory = D.createDirectory . fromRawFilePath
|
||||
|
||||
setFileMode :: RawFilePath -> FileMode -> IO ()
|
||||
setFileMode p m = do
|
||||
p' <- fromRawFilePath <$> convertToWindowsNativeNamespace p
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue