module Effectful.FileSystem.OsPath
(
FileSystem
, runFileSystem
, createDirectory
, createDirectoryIfMissing
, removeDirectory
, removeDirectoryRecursive
, removePathForcibly
, renameDirectory
, listDirectory
, getDirectoryContents
, getCurrentDirectory
, setCurrentDirectory
, withCurrentDirectory
, getHomeDirectory
, getXdgDirectory
, getXdgDirectoryList
, getAppUserDataDirectory
, getUserDocumentsDirectory
, getTemporaryDirectory
, removeFile
, renameFile
, renamePath
, copyFile
, copyFileWithMetadata
, getFileSize
, canonicalizePath
, makeAbsolute
, makeRelativeToCurrentDirectory
, doesPathExist
, doesFileExist
, doesDirectoryExist
, findExecutable
, findExecutables
, findExecutablesInDirectories
, findFile
, findFiles
, findFileWith
, findFilesWith
, createFileLink
, createDirectoryLink
, removeDirectoryLink
, pathIsSymbolicLink
, getSymbolicLinkTarget
, getPermissions
, setPermissions
, copyPermissions
, getAccessTime
, getModificationTime
, setAccessTime
, setModificationTime
, D.XdgDirectory(..)
, D.XdgDirectoryList(..)
, D.exeExtension
, D.Permissions
, D.emptyPermissions
, D.readable
, D.writable
, D.executable
, D.searchable
, D.setOwnerReadable
, D.setOwnerWritable
, D.setOwnerExecutable
, D.setOwnerSearchable
) where
import Data.Time (UTCTime)
import System.Directory.OsPath qualified as D
import System.OsPath (OsPath, OsString)
import Effectful
import Effectful.Dispatch.Static
import Effectful.FileSystem.Effect
createDirectory :: FileSystem :> es => OsPath -> Eff es ()
createDirectory :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
createDirectory = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.createDirectory
createDirectoryIfMissing :: FileSystem :> es => Bool -> OsPath -> Eff es ()
createDirectoryIfMissing :: forall (es :: [Effect]).
(FileSystem :> es) =>
Bool -> OsPath -> Eff es ()
createDirectoryIfMissing Bool
doCreateParents =
IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> OsPath -> IO ()
D.createDirectoryIfMissing Bool
doCreateParents
removeDirectory :: FileSystem :> es => OsPath -> Eff es ()
removeDirectory :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
removeDirectory = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.removeDirectory
removeDirectoryRecursive :: FileSystem :> es => OsPath -> Eff es ()
removeDirectoryRecursive :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
removeDirectoryRecursive = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.removeDirectoryRecursive
removePathForcibly :: FileSystem :> es => OsPath -> Eff es ()
removePathForcibly :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
removePathForcibly = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.removePathForcibly
renameDirectory :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
renameDirectory :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
renameDirectory OsPath
old = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.renameDirectory OsPath
old
listDirectory :: FileSystem :> es => OsPath -> Eff es [OsPath]
listDirectory :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es [OsPath]
listDirectory = IO [OsPath] -> Eff es [OsPath]
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO [OsPath] -> Eff es [OsPath])
-> (OsPath -> IO [OsPath]) -> OsPath -> Eff es [OsPath]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO [OsPath]
D.listDirectory
getDirectoryContents :: FileSystem :> es => OsPath -> Eff es [OsPath]
getDirectoryContents :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es [OsPath]
getDirectoryContents = IO [OsPath] -> Eff es [OsPath]
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO [OsPath] -> Eff es [OsPath])
-> (OsPath -> IO [OsPath]) -> OsPath -> Eff es [OsPath]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO [OsPath]
D.getDirectoryContents
getCurrentDirectory :: FileSystem :> es => Eff es OsPath
getCurrentDirectory :: forall (es :: [Effect]). (FileSystem :> es) => Eff es OsPath
getCurrentDirectory = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ IO OsPath
D.getCurrentDirectory
setCurrentDirectory :: FileSystem :> es => OsPath -> Eff es ()
setCurrentDirectory :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
setCurrentDirectory = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.setCurrentDirectory
withCurrentDirectory :: FileSystem :> es => OsPath -> Eff es a -> Eff es a
withCurrentDirectory :: forall (es :: [Effect]) a.
(FileSystem :> es) =>
OsPath -> Eff es a -> Eff es a
withCurrentDirectory OsPath
path = (IO a -> IO a) -> Eff es a -> Eff es a
forall a b (es :: [Effect]).
HasCallStack =>
(IO a -> IO b) -> Eff es a -> Eff es b
unsafeLiftMapIO (OsPath -> IO a -> IO a
forall a. OsPath -> IO a -> IO a
D.withCurrentDirectory OsPath
path)
getHomeDirectory :: FileSystem :> es => Eff es OsPath
getHomeDirectory :: forall (es :: [Effect]). (FileSystem :> es) => Eff es OsPath
getHomeDirectory = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ IO OsPath
D.getHomeDirectory
getXdgDirectory
:: FileSystem :> es
=> D.XdgDirectory
-> OsPath
-> Eff es OsPath
getXdgDirectory :: forall (es :: [Effect]).
(FileSystem :> es) =>
XdgDirectory -> OsPath -> Eff es OsPath
getXdgDirectory XdgDirectory
xdgDir = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO OsPath -> Eff es OsPath)
-> (OsPath -> IO OsPath) -> OsPath -> Eff es OsPath
forall b c a. (b -> c) -> (a -> b) -> a -> c
. XdgDirectory -> OsPath -> IO OsPath
D.getXdgDirectory XdgDirectory
xdgDir
getXdgDirectoryList
:: FileSystem :> es
=> D.XdgDirectoryList
-> Eff es [OsPath]
getXdgDirectoryList :: forall (es :: [Effect]).
(FileSystem :> es) =>
XdgDirectoryList -> Eff es [OsPath]
getXdgDirectoryList = IO [OsPath] -> Eff es [OsPath]
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO [OsPath] -> Eff es [OsPath])
-> (XdgDirectoryList -> IO [OsPath])
-> XdgDirectoryList
-> Eff es [OsPath]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. XdgDirectoryList -> IO [OsPath]
D.getXdgDirectoryList
getAppUserDataDirectory :: FileSystem :> es => OsPath -> Eff es OsPath
getAppUserDataDirectory :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es OsPath
getAppUserDataDirectory = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO OsPath -> Eff es OsPath)
-> (OsPath -> IO OsPath) -> OsPath -> Eff es OsPath
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO OsPath
D.getAppUserDataDirectory
getUserDocumentsDirectory :: FileSystem :> es => Eff es OsPath
getUserDocumentsDirectory :: forall (es :: [Effect]). (FileSystem :> es) => Eff es OsPath
getUserDocumentsDirectory = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ IO OsPath
D.getUserDocumentsDirectory
getTemporaryDirectory :: FileSystem :> es => Eff es OsPath
getTemporaryDirectory :: forall (es :: [Effect]). (FileSystem :> es) => Eff es OsPath
getTemporaryDirectory = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ IO OsPath
D.getTemporaryDirectory
removeFile :: FileSystem :> es => OsPath -> Eff es ()
removeFile :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
removeFile = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.removeFile
renameFile :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
renameFile :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
renameFile OsPath
old = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.renameFile OsPath
old
renamePath :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
renamePath :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
renamePath OsPath
old = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.renamePath OsPath
old
copyFile :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
copyFile :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
copyFile OsPath
src = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.copyFile OsPath
src
copyFileWithMetadata :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
copyFileWithMetadata :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
copyFileWithMetadata OsPath
src = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.copyFileWithMetadata OsPath
src
getFileSize :: FileSystem :> es => OsPath -> Eff es Integer
getFileSize :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es Integer
getFileSize = IO Integer -> Eff es Integer
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO Integer -> Eff es Integer)
-> (OsPath -> IO Integer) -> OsPath -> Eff es Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO Integer
D.getFileSize
canonicalizePath :: FileSystem :> es => OsPath -> Eff es OsPath
canonicalizePath :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es OsPath
canonicalizePath = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO OsPath -> Eff es OsPath)
-> (OsPath -> IO OsPath) -> OsPath -> Eff es OsPath
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO OsPath
D.canonicalizePath
makeAbsolute :: FileSystem :> es => OsPath -> Eff es OsPath
makeAbsolute :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es OsPath
makeAbsolute = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO OsPath -> Eff es OsPath)
-> (OsPath -> IO OsPath) -> OsPath -> Eff es OsPath
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO OsPath
D.makeAbsolute
makeRelativeToCurrentDirectory
:: FileSystem :> es
=> OsPath
-> Eff es OsPath
makeRelativeToCurrentDirectory :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es OsPath
makeRelativeToCurrentDirectory = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO OsPath -> Eff es OsPath)
-> (OsPath -> IO OsPath) -> OsPath -> Eff es OsPath
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO OsPath
D.makeRelativeToCurrentDirectory
doesPathExist :: FileSystem :> es => OsPath -> Eff es Bool
doesPathExist :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es Bool
doesPathExist = IO Bool -> Eff es Bool
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO Bool -> Eff es Bool)
-> (OsPath -> IO Bool) -> OsPath -> Eff es Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO Bool
D.doesPathExist
doesFileExist :: FileSystem :> es => OsPath -> Eff es Bool
doesFileExist :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es Bool
doesFileExist = IO Bool -> Eff es Bool
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO Bool -> Eff es Bool)
-> (OsPath -> IO Bool) -> OsPath -> Eff es Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO Bool
D.doesFileExist
doesDirectoryExist :: FileSystem :> es => OsPath -> Eff es Bool
doesDirectoryExist :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es Bool
doesDirectoryExist = IO Bool -> Eff es Bool
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO Bool -> Eff es Bool)
-> (OsPath -> IO Bool) -> OsPath -> Eff es Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO Bool
D.doesDirectoryExist
findExecutable :: FileSystem :> es => OsString -> Eff es (Maybe OsPath)
findExecutable :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es (Maybe OsPath)
findExecutable = IO (Maybe OsPath) -> Eff es (Maybe OsPath)
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO (Maybe OsPath) -> Eff es (Maybe OsPath))
-> (OsPath -> IO (Maybe OsPath)) -> OsPath -> Eff es (Maybe OsPath)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO (Maybe OsPath)
D.findExecutable
findExecutables :: FileSystem :> es => OsString -> Eff es [OsPath]
findExecutables :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es [OsPath]
findExecutables = IO [OsPath] -> Eff es [OsPath]
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO [OsPath] -> Eff es [OsPath])
-> (OsPath -> IO [OsPath]) -> OsPath -> Eff es [OsPath]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO [OsPath]
D.findExecutables
findExecutablesInDirectories
:: FileSystem :> es
=> [OsPath]
-> OsString
-> Eff es [OsPath]
findExecutablesInDirectories :: forall (es :: [Effect]).
(FileSystem :> es) =>
[OsPath] -> OsPath -> Eff es [OsPath]
findExecutablesInDirectories [OsPath]
dirs =
IO [OsPath] -> Eff es [OsPath]
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO [OsPath] -> Eff es [OsPath])
-> (OsPath -> IO [OsPath]) -> OsPath -> Eff es [OsPath]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [OsPath] -> OsPath -> IO [OsPath]
D.findExecutablesInDirectories [OsPath]
dirs
findFile :: FileSystem :> es => [OsPath] -> OsString -> Eff es (Maybe OsPath)
findFile :: forall (es :: [Effect]).
(FileSystem :> es) =>
[OsPath] -> OsPath -> Eff es (Maybe OsPath)
findFile [OsPath]
dirs = IO (Maybe OsPath) -> Eff es (Maybe OsPath)
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO (Maybe OsPath) -> Eff es (Maybe OsPath))
-> (OsPath -> IO (Maybe OsPath)) -> OsPath -> Eff es (Maybe OsPath)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [OsPath] -> OsPath -> IO (Maybe OsPath)
D.findFile [OsPath]
dirs
findFiles :: FileSystem :> es => [OsPath] -> OsString -> Eff es [OsPath]
findFiles :: forall (es :: [Effect]).
(FileSystem :> es) =>
[OsPath] -> OsPath -> Eff es [OsPath]
findFiles [OsPath]
dirs = IO [OsPath] -> Eff es [OsPath]
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO [OsPath] -> Eff es [OsPath])
-> (OsPath -> IO [OsPath]) -> OsPath -> Eff es [OsPath]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [OsPath] -> OsPath -> IO [OsPath]
D.findFiles [OsPath]
dirs
findFileWith
:: FileSystem :> es
=> (OsPath -> Eff es Bool)
-> [OsPath]
-> OsString
-> Eff es (Maybe OsPath)
findFileWith :: forall (es :: [Effect]).
(FileSystem :> es) =>
(OsPath -> Eff es Bool)
-> [OsPath] -> OsPath -> Eff es (Maybe OsPath)
findFileWith OsPath -> Eff es Bool
p [OsPath]
dirs OsPath
n = ((forall r. Eff es r -> IO r) -> IO (Maybe OsPath))
-> Eff es (Maybe OsPath)
forall (es :: [Effect]) a.
HasCallStack =>
((forall r. Eff es r -> IO r) -> IO a) -> Eff es a
unsafeSeqUnliftIO (((forall r. Eff es r -> IO r) -> IO (Maybe OsPath))
-> Eff es (Maybe OsPath))
-> ((forall r. Eff es r -> IO r) -> IO (Maybe OsPath))
-> Eff es (Maybe OsPath)
forall a b. (a -> b) -> a -> b
$ \forall r. Eff es r -> IO r
unlift -> do
(OsPath -> IO Bool) -> [OsPath] -> OsPath -> IO (Maybe OsPath)
D.findFileWith (Eff es Bool -> IO Bool
forall r. Eff es r -> IO r
unlift (Eff es Bool -> IO Bool)
-> (OsPath -> Eff es Bool) -> OsPath -> IO Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> Eff es Bool
p) [OsPath]
dirs OsPath
n
findFilesWith
:: FileSystem :> es
=> (OsPath -> Eff es Bool)
-> [OsPath]
-> OsString
-> Eff es [OsPath]
findFilesWith :: forall (es :: [Effect]).
(FileSystem :> es) =>
(OsPath -> Eff es Bool) -> [OsPath] -> OsPath -> Eff es [OsPath]
findFilesWith OsPath -> Eff es Bool
p [OsPath]
dirs OsPath
ns = ((forall r. Eff es r -> IO r) -> IO [OsPath]) -> Eff es [OsPath]
forall (es :: [Effect]) a.
HasCallStack =>
((forall r. Eff es r -> IO r) -> IO a) -> Eff es a
unsafeSeqUnliftIO (((forall r. Eff es r -> IO r) -> IO [OsPath]) -> Eff es [OsPath])
-> ((forall r. Eff es r -> IO r) -> IO [OsPath]) -> Eff es [OsPath]
forall a b. (a -> b) -> a -> b
$ \forall r. Eff es r -> IO r
unlift -> do
(OsPath -> IO Bool) -> [OsPath] -> OsPath -> IO [OsPath]
D.findFilesWith (Eff es Bool -> IO Bool
forall r. Eff es r -> IO r
unlift (Eff es Bool -> IO Bool)
-> (OsPath -> Eff es Bool) -> OsPath -> IO Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> Eff es Bool
p) [OsPath]
dirs OsPath
ns
createFileLink :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
createFileLink :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
createFileLink OsPath
target = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.createFileLink OsPath
target
createDirectoryLink :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
createDirectoryLink :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
createDirectoryLink OsPath
target = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.createDirectoryLink OsPath
target
removeDirectoryLink :: FileSystem :> es => OsPath -> Eff es ()
removeDirectoryLink :: forall (es :: [Effect]). (FileSystem :> es) => OsPath -> Eff es ()
removeDirectoryLink = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO ()
D.removeDirectoryLink
pathIsSymbolicLink :: FileSystem :> es => OsPath -> Eff es Bool
pathIsSymbolicLink :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es Bool
pathIsSymbolicLink = IO Bool -> Eff es Bool
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO Bool -> Eff es Bool)
-> (OsPath -> IO Bool) -> OsPath -> Eff es Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO Bool
D.pathIsSymbolicLink
getSymbolicLinkTarget :: FileSystem :> es => OsPath -> Eff es OsPath
getSymbolicLinkTarget :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es OsPath
getSymbolicLinkTarget = IO OsPath -> Eff es OsPath
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO OsPath -> Eff es OsPath)
-> (OsPath -> IO OsPath) -> OsPath -> Eff es OsPath
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO OsPath
D.getSymbolicLinkTarget
getPermissions :: FileSystem :> es => OsPath -> Eff es D.Permissions
getPermissions :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es Permissions
getPermissions = IO Permissions -> Eff es Permissions
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO Permissions -> Eff es Permissions)
-> (OsPath -> IO Permissions) -> OsPath -> Eff es Permissions
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO Permissions
D.getPermissions
setPermissions :: FileSystem :> es => OsPath -> D.Permissions -> Eff es ()
setPermissions :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Permissions -> Eff es ()
setPermissions OsPath
path = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ())
-> (Permissions -> IO ()) -> Permissions -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> Permissions -> IO ()
D.setPermissions OsPath
path
copyPermissions :: FileSystem :> es => OsPath -> OsPath -> Eff es ()
copyPermissions :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> OsPath -> Eff es ()
copyPermissions OsPath
src = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (OsPath -> IO ()) -> OsPath -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> OsPath -> IO ()
D.copyPermissions OsPath
src
getAccessTime :: FileSystem :> es => OsPath -> Eff es UTCTime
getAccessTime :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es UTCTime
getAccessTime = IO UTCTime -> Eff es UTCTime
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO UTCTime -> Eff es UTCTime)
-> (OsPath -> IO UTCTime) -> OsPath -> Eff es UTCTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO UTCTime
D.getAccessTime
getModificationTime :: FileSystem :> es => OsPath -> Eff es UTCTime
getModificationTime :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> Eff es UTCTime
getModificationTime = IO UTCTime -> Eff es UTCTime
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO UTCTime -> Eff es UTCTime)
-> (OsPath -> IO UTCTime) -> OsPath -> Eff es UTCTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> IO UTCTime
D.getModificationTime
setAccessTime :: FileSystem :> es => OsPath -> UTCTime -> Eff es ()
setAccessTime :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> UTCTime -> Eff es ()
setAccessTime OsPath
path = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (UTCTime -> IO ()) -> UTCTime -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> UTCTime -> IO ()
D.setAccessTime OsPath
path
setModificationTime :: FileSystem :> es => OsPath -> UTCTime -> Eff es ()
setModificationTime :: forall (es :: [Effect]).
(FileSystem :> es) =>
OsPath -> UTCTime -> Eff es ()
setModificationTime OsPath
path = IO () -> Eff es ()
forall a (es :: [Effect]). IO a -> Eff es a
unsafeEff_ (IO () -> Eff es ()) -> (UTCTime -> IO ()) -> UTCTime -> Eff es ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OsPath -> UTCTime -> IO ()
D.setModificationTime OsPath
path