Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Unlifted System.Directory.
Since: unliftio-0.2.6.0
Synopsis
- createDirectory :: MonadIO m => FilePath -> m ()
- createDirectoryIfMissing :: MonadIO m => Bool -> FilePath -> m ()
- removeDirectory :: MonadIO m => FilePath -> m ()
- removeDirectoryRecursive :: MonadIO m => FilePath -> m ()
- removePathForcibly :: MonadIO m => FilePath -> m ()
- renameDirectory :: MonadIO m => FilePath -> FilePath -> m ()
- listDirectory :: MonadIO m => FilePath -> m [FilePath]
- getDirectoryContents :: MonadIO m => FilePath -> m [FilePath]
- getCurrentDirectory :: MonadIO m => m FilePath
- setCurrentDirectory :: MonadIO m => FilePath -> m ()
- withCurrentDirectory :: MonadUnliftIO m => FilePath -> m a -> m a
- getHomeDirectory :: MonadIO m => m FilePath
- data XdgDirectory
- getXdgDirectory :: MonadIO m => XdgDirectory -> FilePath -> m FilePath
- getAppUserDataDirectory :: MonadIO m => FilePath -> m FilePath
- getUserDocumentsDirectory :: MonadIO m => m FilePath
- getTemporaryDirectory :: MonadIO m => m FilePath
- removeFile :: MonadIO m => FilePath -> m ()
- renameFile :: MonadIO m => FilePath -> FilePath -> m ()
- renamePath :: MonadIO m => FilePath -> FilePath -> m ()
- copyFile :: MonadIO m => FilePath -> FilePath -> m ()
- copyFileWithMetadata :: MonadIO m => FilePath -> FilePath -> m ()
- canonicalizePath :: MonadIO m => FilePath -> m FilePath
- makeAbsolute :: MonadIO m => FilePath -> m FilePath
- makeRelativeToCurrentDirectory :: MonadIO m => FilePath -> m FilePath
- findExecutable :: MonadIO m => String -> m (Maybe FilePath)
- findExecutables :: MonadIO m => String -> m [FilePath]
- findExecutablesInDirectories :: MonadIO m => [FilePath] -> String -> m [FilePath]
- findFile :: MonadIO m => [FilePath] -> String -> m (Maybe FilePath)
- findFiles :: MonadIO m => [FilePath] -> String -> m [FilePath]
- findFileWith :: MonadUnliftIO m => (FilePath -> m Bool) -> [FilePath] -> String -> m (Maybe FilePath)
- findFilesWith :: MonadUnliftIO m => (FilePath -> m Bool) -> [FilePath] -> String -> m [FilePath]
- exeExtension :: String
- getFileSize :: MonadIO m => FilePath -> m Integer
- doesPathExist :: MonadIO m => FilePath -> m Bool
- doesFileExist :: MonadIO m => FilePath -> m Bool
- doesDirectoryExist :: MonadIO m => FilePath -> m Bool
- pathIsSymbolicLink :: MonadIO m => FilePath -> m Bool
- data Permissions
- emptyPermissions :: Permissions
- readable :: Permissions -> Bool
- writable :: Permissions -> Bool
- executable :: Permissions -> Bool
- searchable :: Permissions -> Bool
- setOwnerReadable :: Bool -> Permissions -> Permissions
- setOwnerWritable :: Bool -> Permissions -> Permissions
- setOwnerExecutable :: Bool -> Permissions -> Permissions
- setOwnerSearchable :: Bool -> Permissions -> Permissions
- getPermissions :: MonadIO m => FilePath -> m Permissions
- setPermissions :: MonadIO m => FilePath -> Permissions -> m ()
- copyPermissions :: MonadIO m => FilePath -> FilePath -> m ()
- getAccessTime :: MonadIO m => FilePath -> m UTCTime
- getModificationTime :: MonadIO m => FilePath -> m UTCTime
- setAccessTime :: MonadIO m => FilePath -> UTCTime -> m ()
- setModificationTime :: MonadIO m => FilePath -> UTCTime -> m ()
Actions on directories
createDirectory :: MonadIO m => FilePath -> m () Source #
Lifted createDirectory
.
Since: unliftio-0.2.6.0
createDirectoryIfMissing :: MonadIO m => Bool -> FilePath -> m () Source #
Lifted createDirectoryIfMissing
.
Since: unliftio-0.2.6.0
removeDirectory :: MonadIO m => FilePath -> m () Source #
Lifted removeDirectory
.
Since: unliftio-0.2.6.0
removeDirectoryRecursive :: MonadIO m => FilePath -> m () Source #
Lifted removeDirectoryRecursive
.
Since: unliftio-0.2.6.0
removePathForcibly :: MonadIO m => FilePath -> m () Source #
Lifted removePathForcibly
.
Since: unliftio-0.2.6.0
renameDirectory :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted renameDirectory
.
Since: unliftio-0.2.6.0
listDirectory :: MonadIO m => FilePath -> m [FilePath] Source #
Lifted listDirectory
.
Since: unliftio-0.2.6.0
getDirectoryContents :: MonadIO m => FilePath -> m [FilePath] Source #
Lifted getDirectoryContents
.
Since: unliftio-0.2.6.0
Current working directory
getCurrentDirectory :: MonadIO m => m FilePath Source #
Lifted getCurrentDirectory
.
Since: unliftio-0.2.6.0
setCurrentDirectory :: MonadIO m => FilePath -> m () Source #
Lifted setCurrentDirectory
.
Since: unliftio-0.2.6.0
withCurrentDirectory :: MonadUnliftIO m => FilePath -> m a -> m a Source #
Unlifted withCurrentDirectory
.
Since: unliftio-0.2.6.0
Pre-defined directories
getHomeDirectory :: MonadIO m => m FilePath Source #
Lifted getHomeDirectory
.
Since: unliftio-0.2.6.0
data XdgDirectory #
Special directories for storing user-specific application data, configuration, and cache files, as specified by the XDG Base Directory Specification.
Note: On Windows, XdgData
and XdgConfig
map to the same directory.
Since: directory-1.2.3.0
XdgData | For data files (e.g. images).
Defaults to |
XdgConfig | For configuration files.
Defaults to |
XdgCache | For non-essential files (e.g. cache).
Defaults to |
Instances
getXdgDirectory :: MonadIO m => XdgDirectory -> FilePath -> m FilePath Source #
Lifted getXdgDirectory
.
Since: unliftio-0.2.6.0
getAppUserDataDirectory :: MonadIO m => FilePath -> m FilePath Source #
Lifted getAppUserDataDirectory
.
Since: unliftio-0.2.6.0
getUserDocumentsDirectory :: MonadIO m => m FilePath Source #
Lifted getUserDocumentsDirectory
.
Since: unliftio-0.2.6.0
getTemporaryDirectory :: MonadIO m => m FilePath Source #
Lifted getTemporaryDirectory
.
Since: unliftio-0.2.6.0
Actions on files
removeFile :: MonadIO m => FilePath -> m () Source #
Lifted removeFile
.
Since: unliftio-0.2.6.0
renameFile :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted renameFile
.
Since: unliftio-0.2.6.0
renamePath :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted renamePath
.
Since: unliftio-0.2.6.0
copyFile :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted copyFile
.
Since: unliftio-0.2.6.0
copyFileWithMetadata :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted copyFileWithMetadata
.
Since: unliftio-0.2.6.0
canonicalizePath :: MonadIO m => FilePath -> m FilePath Source #
Lifted canonicalizePath
.
Since: unliftio-0.2.6.0
makeAbsolute :: MonadIO m => FilePath -> m FilePath Source #
Lifted makeAbsolute
.
Since: unliftio-0.2.6.0
makeRelativeToCurrentDirectory :: MonadIO m => FilePath -> m FilePath Source #
Lifted makeRelativeToCurrentDirectory
.
Since: unliftio-0.2.6.0
findExecutable :: MonadIO m => String -> m (Maybe FilePath) Source #
Lifted findExecutable
.
Since: unliftio-0.2.6.0
findExecutables :: MonadIO m => String -> m [FilePath] Source #
Lifted findExecutables
.
Since: unliftio-0.2.6.0
findExecutablesInDirectories :: MonadIO m => [FilePath] -> String -> m [FilePath] Source #
Lifted findExecutablesInDirectories
.
Since: unliftio-0.2.6.0
findFile :: MonadIO m => [FilePath] -> String -> m (Maybe FilePath) Source #
Lifted findFile
.
Since: unliftio-0.2.6.0
findFiles :: MonadIO m => [FilePath] -> String -> m [FilePath] Source #
Lifted findFiles
.
Since: unliftio-0.2.6.0
findFileWith :: MonadUnliftIO m => (FilePath -> m Bool) -> [FilePath] -> String -> m (Maybe FilePath) Source #
Unlifted findFileWith
.
Since: unliftio-0.2.6.0
findFilesWith :: MonadUnliftIO m => (FilePath -> m Bool) -> [FilePath] -> String -> m [FilePath] Source #
Unlifted findFilesWith
.
Since: unliftio-0.2.6.0
exeExtension :: String #
Filename extension for executable files (including the dot if any)
(usually ""
on POSIX systems and ".exe"
on Windows or OS/2).
Since: directory-1.2.4.0
getFileSize :: MonadIO m => FilePath -> m Integer Source #
Lifted getFileSize
.
Since: unliftio-0.2.6.0
Existence tests
doesPathExist :: MonadIO m => FilePath -> m Bool Source #
Lifted doesPathExist
.
Since: unliftio-0.2.6.0
doesFileExist :: MonadIO m => FilePath -> m Bool Source #
Lifted doesFileExist
.
Since: unliftio-0.2.6.0
doesDirectoryExist :: MonadIO m => FilePath -> m Bool Source #
Lifted doesDirectoryExist
.
Since: unliftio-0.2.6.0
Symbolic links
pathIsSymbolicLink :: MonadIO m => FilePath -> m Bool Source #
Lifted pathIsSymbolicLink
.
Since: unliftio-0.2.6.0
Permissions
data Permissions #
Instances
Eq Permissions | |
Defined in System.Directory.Internal.Common (==) :: Permissions -> Permissions -> Bool # (/=) :: Permissions -> Permissions -> Bool # | |
Ord Permissions | |
Defined in System.Directory.Internal.Common compare :: Permissions -> Permissions -> Ordering # (<) :: Permissions -> Permissions -> Bool # (<=) :: Permissions -> Permissions -> Bool # (>) :: Permissions -> Permissions -> Bool # (>=) :: Permissions -> Permissions -> Bool # max :: Permissions -> Permissions -> Permissions # min :: Permissions -> Permissions -> Permissions # | |
Read Permissions | |
Defined in System.Directory.Internal.Common readsPrec :: Int -> ReadS Permissions # readList :: ReadS [Permissions] # readPrec :: ReadPrec Permissions # readListPrec :: ReadPrec [Permissions] # | |
Show Permissions | |
Defined in System.Directory.Internal.Common showsPrec :: Int -> Permissions -> ShowS # show :: Permissions -> String # showList :: [Permissions] -> ShowS # |
readable :: Permissions -> Bool #
writable :: Permissions -> Bool #
executable :: Permissions -> Bool #
searchable :: Permissions -> Bool #
setOwnerReadable :: Bool -> Permissions -> Permissions #
setOwnerWritable :: Bool -> Permissions -> Permissions #
setOwnerExecutable :: Bool -> Permissions -> Permissions #
setOwnerSearchable :: Bool -> Permissions -> Permissions #
getPermissions :: MonadIO m => FilePath -> m Permissions Source #
Lifted getPermissions
.
Since: unliftio-0.2.6.0
setPermissions :: MonadIO m => FilePath -> Permissions -> m () Source #
Lifted setPermissions
.
Since: unliftio-0.2.6.0
copyPermissions :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted copyPermissions
.
Since: unliftio-0.2.6.0
Timestamps
getAccessTime :: MonadIO m => FilePath -> m UTCTime Source #
Lifted getAccessTime
.
Since: unliftio-0.2.6.0
getModificationTime :: MonadIO m => FilePath -> m UTCTime Source #
Lifted getModificationTime
.
Since: unliftio-0.2.6.0
setAccessTime :: MonadIO m => FilePath -> UTCTime -> m () Source #
Lifted setAccessTime
.
Since: unliftio-0.2.6.0
setModificationTime :: MonadIO m => FilePath -> UTCTime -> m () Source #
Lifted setModificationTime
.
Since: unliftio-0.2.6.0