, copyFile -- :: FilePath -> FilePath -> IO ()
, canonicalizePath
+ , makeRelativeToCurrentDirectory
, findExecutable
-- * Existence tests
import System.Directory.Internals
import System.Environment ( getEnv )
+import System.FilePath
import System.IO.Error
import Control.Monad ( when, unless )
-> IO CString
#endif
+-- | 'makeRelative' the current directory.
+makeRelativeToCurrentDirectory :: FilePath -> IO FilePath
+makeRelativeToCurrentDirectory x = do
+ cur <- getCurrentDirectory
+ return $ makeRelative cur x
+
-- | Given an executable file name, searches for such file
-- in the directories listed in system PATH. The returned value
-- is the path to the found executable or Nothing if there isn't