Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data XdgDirectory
- data XdgDirectoryList
- createDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- createDirectoryIfMissing :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Bool -> FilePath -> Sem r ()
- removeDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- removeDirectoryRecursive :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- removePathForcibly :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- renameDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- listDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r [FilePath]
- getDirectoryContents :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r [FilePath]
- getCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath
- setCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- withCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Resource r => Member Log r => FilePath -> Sem r () -> Sem r ()
- getHomeDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath
- getXdgDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => XdgDirectory -> FilePath -> Sem r FilePath
- getXdgDirectoryList :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => XdgDirectoryList -> Sem r [FilePath]
- getAppUserDataDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath
- getUserDocumentsDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath
- getTemporaryDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath
- removeFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- renameFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- renamePath :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- copyFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- copyFileWithMetadata :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- getFileSize :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Integer
- canonicalizePath :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath
- makeAbsolute :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath
- makeRelativeToCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath
- doesPathExist :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool
- doesFileExist :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool
- doesDirectoryExist :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool
- findExecutable :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => String -> Sem r (Maybe FilePath)
- findExecutables :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => String -> Sem r [FilePath]
- findExecutablesInDirectories :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => [FilePath] -> String -> Sem r [FilePath]
- findFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => [FilePath] -> String -> Sem r (Maybe FilePath)
- findFiles :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => [FilePath] -> String -> Sem r [FilePath]
- findFileWith :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => (FilePath -> IO Bool) -> [FilePath] -> String -> Sem r (Maybe FilePath)
- findFilesWith :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => (FilePath -> IO Bool) -> [FilePath] -> String -> Sem r [FilePath]
- exeExtension :: String
- createFileLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- createDirectoryLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- removeDirectoryLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r ()
- pathIsSymbolicLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool
- getSymbolicLinkTarget :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath
- 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 :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Permissions
- setPermissions :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Permissions -> Sem r ()
- copyPermissions :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r ()
- getAccessTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r UTCTime
- getModificationTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r UTCTime
- setAccessTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> UTCTime -> Sem r ()
- setModificationTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> UTCTime -> Sem r ()
Documentation
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
usually map to the same
directory.
Since: directory-1.2.3.0
XdgData | For data files (e.g. images).
It uses the |
XdgConfig | For configuration files.
It uses the |
XdgCache | For non-essential files (e.g. cache).
It uses the |
XdgState | For data that should persist between (application) restarts,
but that is not important or portable enough to the user that it
should be stored in Since: directory-1.3.7.0 |
Instances
data XdgDirectoryList #
Search paths for various application data, as specified by the XDG Base Directory Specification.
The list of paths is split using searchPathSeparator
,
which on Windows is a semicolon.
Note: On Windows, XdgDataDirs
and XdgConfigDirs
usually yield the same
result.
Since: directory-1.3.2.0
XdgDataDirs | For data files (e.g. images).
It uses the |
XdgConfigDirs | For configuration files.
It uses the |
Instances
Actions on directories
createDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
createDirectoryIfMissing :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Bool -> FilePath -> Sem r () Source #
removeDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
removeDirectoryRecursive :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
removePathForcibly :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
renameDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
listDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r [FilePath] Source #
getDirectoryContents :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r [FilePath] Source #
Current working directory
getCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath Source #
setCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
withCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Resource r => Member Log r => FilePath -> Sem r () -> Sem r () Source #
Pre-defined directories
getHomeDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath Source #
getXdgDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => XdgDirectory -> FilePath -> Sem r FilePath Source #
getXdgDirectoryList :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => XdgDirectoryList -> Sem r [FilePath] Source #
getAppUserDataDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath Source #
getUserDocumentsDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath Source #
getTemporaryDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => Sem r FilePath Source #
Actions on files
removeFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
renameFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
renamePath :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
copyFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
copyFileWithMetadata :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
getFileSize :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Integer Source #
canonicalizePath :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath Source #
makeAbsolute :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath Source #
makeRelativeToCurrentDirectory :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath Source #
Existence tests
doesPathExist :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool Source #
doesFileExist :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool Source #
doesDirectoryExist :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool Source #
findExecutable :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => String -> Sem r (Maybe FilePath) Source #
findExecutables :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => String -> Sem r [FilePath] Source #
findExecutablesInDirectories :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => [FilePath] -> String -> Sem r [FilePath] Source #
findFile :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => [FilePath] -> String -> Sem r (Maybe FilePath) Source #
findFiles :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => [FilePath] -> String -> Sem r [FilePath] Source #
findFileWith :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => (FilePath -> IO Bool) -> [FilePath] -> String -> Sem r (Maybe FilePath) Source #
findFilesWith :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => (FilePath -> IO Bool) -> [FilePath] -> String -> Sem r [FilePath] Source #
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
Symbolic links
createFileLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
createDirectoryLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
removeDirectoryLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r () Source #
pathIsSymbolicLink :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Bool Source #
getSymbolicLinkTarget :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath Source #
data Permissions #
Instances
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 # | |
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 # |
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 :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r Permissions Source #
setPermissions :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Permissions -> Sem r () Source #
copyPermissions :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> FilePath -> Sem r () Source #
Timestamps
getAccessTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r UTCTime Source #
getModificationTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> Sem r UTCTime Source #
setAccessTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> UTCTime -> Sem r () Source #
setModificationTime :: HasCallStack => Member (Error IOException) r => Member (Embed IO) r => Member Log r => FilePath -> UTCTime -> Sem r () Source #