Create HPath.IO module, adding canonicalizePath again
This commit is contained in:
parent
4ce35b9bec
commit
6638cd8cc1
@ -22,6 +22,7 @@ library
|
||||
ghc-options: -Wall -O2
|
||||
c-sources: cbits/dirutils.c
|
||||
exposed-modules: HPath,
|
||||
HPath.IO,
|
||||
HPath.Internal,
|
||||
System.Posix.Directory.Foreign,
|
||||
System.Posix.Directory.Traversals,
|
||||
|
28
src/HPath/IO.hs
Normal file
28
src/HPath/IO.hs
Normal file
@ -0,0 +1,28 @@
|
||||
-- |
|
||||
-- Module : HPath.IO
|
||||
-- Copyright : © 2016 Julian Ospald
|
||||
-- License : BSD 3 clause
|
||||
--
|
||||
-- Maintainer : Julian Ospald <hasufell@posteo.de>
|
||||
-- Stability : experimental
|
||||
-- Portability : portable
|
||||
--
|
||||
-- IO operations on HPath.
|
||||
|
||||
{-# OPTIONS_HADDOCK ignore-exports #-}
|
||||
|
||||
module HPath.IO
|
||||
where
|
||||
|
||||
|
||||
import HPath
|
||||
import HPath.Internal
|
||||
import System.Posix.Directory.Traversals (realpath)
|
||||
|
||||
|
||||
|
||||
-- | May fail on `realpath`.
|
||||
canonicalizePath :: Path Abs -> IO (Path Abs)
|
||||
canonicalizePath (MkPath l) = do
|
||||
nl <- realpath l
|
||||
return $ MkPath nl
|
Loading…
Reference in New Issue
Block a user