more RawFilePath conversion
nukeFile replaced with removeWhenExistsWith removeLink, which allows using RawFilePath. Utility.Directory cannot use RawFilePath since setup does not depend on posix. This commit was sponsored by Graham Spencer on Patreon.
This commit is contained in:
parent
8d66f7ba0f
commit
e505c03bcc
51 changed files with 182 additions and 153 deletions
|
@ -18,6 +18,8 @@ module Utility.RawFilePath (
|
|||
RawFilePath,
|
||||
readSymbolicLink,
|
||||
createSymbolicLink,
|
||||
createLink,
|
||||
removeLink,
|
||||
getFileStatus,
|
||||
getSymbolicLinkStatus,
|
||||
doesPathExist,
|
||||
|
@ -56,6 +58,14 @@ createSymbolicLink a b = P.createSymbolicLink
|
|||
(fromRawFilePath a)
|
||||
(fromRawFilePath b)
|
||||
|
||||
createLink :: RawFilePath -> RawFilePath -> IO ()
|
||||
createLink a b = P.createLink
|
||||
(fromRawFilePath a)
|
||||
(fromRawFilePath b)
|
||||
|
||||
removeLink :: RawFilePath -> IO ()
|
||||
removeLink = P.removeLink . fromRawFilePath
|
||||
|
||||
getFileStatus :: RawFilePath -> IO FileStatus
|
||||
getFileStatus = P.getFileStatus . fromRawFilePath
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue