Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unlifted System.Directory .
Since: 0.2.6.0
Synopsis
- createDirectory :: MonadIO m => FilePath -> m ()
- createDirectoryIfMissing :: MonadIO m => Bool -> FilePath -> m ()
- createFileLink :: MonadIO m => FilePath -> FilePath -> m ()
- createDirectoryLink :: MonadIO m => FilePath -> FilePath -> m ()
- removeDirectoryLink :: MonadIO m => FilePath -> m ()
- getSymbolicLinkTarget :: MonadIO m => FilePath -> m FilePath
- 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
- data XdgDirectoryList
- getXdgDirectoryList :: MonadIO m => XdgDirectoryList -> 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: 0.2.6.0
createDirectoryIfMissing :: MonadIO m => Bool -> FilePath -> m () Source #
Lifted
createDirectoryIfMissing
.
Since: 0.2.6.0
Lifted
createFileLink
.
directory package version should be >= 1.3.1.
@since 0.2.16.0
createDirectoryLink :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted
createDirectoryLink
.
Since: 0.2.21.0
removeDirectoryLink :: MonadIO m => FilePath -> m () Source #
Lifted
removeDirectoryLink
.
Since: 0.2.21.0
getSymbolicLinkTarget :: MonadIO m => FilePath -> m FilePath Source #
Lifted
getSymbolicLinkTarget
.
Since: 0.2.21.0
removeDirectory :: MonadIO m => FilePath -> m () Source #
Lifted
removeDirectory
.
Since: 0.2.6.0
removeDirectoryRecursive :: MonadIO m => FilePath -> m () Source #
Lifted
removeDirectoryRecursive
.
Since: 0.2.6.0
removePathForcibly :: MonadIO m => FilePath -> m () Source #
Lifted
removePathForcibly
.
Since: 0.2.6.0
renameDirectory :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted
renameDirectory
.
Since: 0.2.6.0
listDirectory :: MonadIO m => FilePath -> m [ FilePath ] Source #
Lifted
listDirectory
.
Since: 0.2.6.0
getDirectoryContents :: MonadIO m => FilePath -> m [ FilePath ] Source #
Lifted
getDirectoryContents
.
Since: 0.2.6.0
Current working directory
getCurrentDirectory :: MonadIO m => m FilePath Source #
Lifted
getCurrentDirectory
.
Since: 0.2.6.0
setCurrentDirectory :: MonadIO m => FilePath -> m () Source #
Lifted
setCurrentDirectory
.
Since: 0.2.6.0
withCurrentDirectory :: MonadUnliftIO m => FilePath -> m a -> m a Source #
Unlifted
withCurrentDirectory
.
Since: 0.2.6.0
Pre-defined directories
getHomeDirectory :: MonadIO m => m FilePath Source #
Lifted
getHomeDirectory
.
Since: 0.2.6.0
data XdgDirectory Source #
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
|
Instances
getXdgDirectory :: MonadIO m => XdgDirectory -> FilePath -> m FilePath Source #
Lifted
getXdgDirectory
.
Since: 0.2.6.0
data XdgDirectoryList Source #
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
getXdgDirectoryList :: MonadIO m => XdgDirectoryList -> m [ FilePath ] Source #
Lifted
getXdgDirectoryList
.
Since: 0.2.21.0
getAppUserDataDirectory :: MonadIO m => FilePath -> m FilePath Source #
Lifted
getAppUserDataDirectory
.
Since: 0.2.6.0
getUserDocumentsDirectory :: MonadIO m => m FilePath Source #
Lifted
getUserDocumentsDirectory
.
Since: 0.2.6.0
getTemporaryDirectory :: MonadIO m => m FilePath Source #
Lifted
getTemporaryDirectory
.
Since: 0.2.6.0
Actions on files
removeFile :: MonadIO m => FilePath -> m () Source #
Lifted
removeFile
.
Since: 0.2.6.0
renameFile :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted
renameFile
.
Since: 0.2.6.0
renamePath :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted
renamePath
.
Since: 0.2.6.0
copyFileWithMetadata :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted
copyFileWithMetadata
.
Since: 0.2.6.0
canonicalizePath :: MonadIO m => FilePath -> m FilePath Source #
Lifted
canonicalizePath
.
Since: 0.2.6.0
makeAbsolute :: MonadIO m => FilePath -> m FilePath Source #
Lifted
makeAbsolute
.
Since: 0.2.6.0
makeRelativeToCurrentDirectory :: MonadIO m => FilePath -> m FilePath Source #
Lifted
makeRelativeToCurrentDirectory
.
Since: 0.2.6.0
findExecutable :: MonadIO m => String -> m ( Maybe FilePath ) Source #
Lifted
findExecutable
.
Since: 0.2.6.0
findExecutables :: MonadIO m => String -> m [ FilePath ] Source #
Lifted
findExecutables
.
Since: 0.2.6.0
findExecutablesInDirectories :: MonadIO m => [ FilePath ] -> String -> m [ FilePath ] Source #
Lifted
findExecutablesInDirectories
.
Since: 0.2.6.0
findFile :: MonadIO m => [ FilePath ] -> String -> m ( Maybe FilePath ) Source #
Lifted
findFile
.
Since: 0.2.6.0
findFiles :: MonadIO m => [ FilePath ] -> String -> m [ FilePath ] Source #
Lifted
findFiles
.
Since: 0.2.6.0
findFileWith :: MonadUnliftIO m => ( FilePath -> m Bool ) -> [ FilePath ] -> String -> m ( Maybe FilePath ) Source #
Unlifted
findFileWith
.
Since: 0.2.6.0
findFilesWith :: MonadUnliftIO m => ( FilePath -> m Bool ) -> [ FilePath ] -> String -> m [ FilePath ] Source #
Unlifted
findFilesWith
.
Since: 0.2.6.0
exeExtension :: String Source #
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: 0.2.6.0
Existence tests
doesPathExist :: MonadIO m => FilePath -> m Bool Source #
Lifted
doesPathExist
.
Since: 0.2.6.0
doesFileExist :: MonadIO m => FilePath -> m Bool Source #
Lifted
doesFileExist
.
Since: 0.2.6.0
doesDirectoryExist :: MonadIO m => FilePath -> m Bool Source #
Lifted
doesDirectoryExist
.
Since: 0.2.6.0
Symbolic links
pathIsSymbolicLink :: MonadIO m => FilePath -> m Bool Source #
Lifted
pathIsSymbolicLink
.
Since: 0.2.6.0
Permissions
data Permissions Source #
Instances
Eq Permissions | |
Defined in System.Directory.Internal.Common (==) :: Permissions -> Permissions -> Bool Source # (/=) :: Permissions -> Permissions -> Bool Source # |
|
Ord Permissions | |
Defined in System.Directory.Internal.Common compare :: Permissions -> Permissions -> Ordering Source # (<) :: Permissions -> Permissions -> Bool Source # (<=) :: Permissions -> Permissions -> Bool Source # (>) :: Permissions -> Permissions -> Bool Source # (>=) :: Permissions -> Permissions -> Bool Source # max :: Permissions -> Permissions -> Permissions Source # min :: Permissions -> Permissions -> Permissions Source # |
|
Read Permissions | |
Defined in System.Directory.Internal.Common readsPrec :: Int -> ReadS Permissions Source # readList :: ReadS [ Permissions ] Source # readPrec :: ReadPrec Permissions Source # readListPrec :: ReadPrec [ Permissions ] Source # |
|
Show Permissions | |
Defined in System.Directory.Internal.Common |
readable :: Permissions -> Bool Source #
writable :: Permissions -> Bool Source #
executable :: Permissions -> Bool Source #
searchable :: Permissions -> Bool Source #
setOwnerReadable :: Bool -> Permissions -> Permissions Source #
setOwnerWritable :: Bool -> Permissions -> Permissions Source #
setOwnerExecutable :: Bool -> Permissions -> Permissions Source #
setOwnerSearchable :: Bool -> Permissions -> Permissions Source #
getPermissions :: MonadIO m => FilePath -> m Permissions Source #
Lifted
getPermissions
.
Since: 0.2.6.0
setPermissions :: MonadIO m => FilePath -> Permissions -> m () Source #
Lifted
setPermissions
.
Since: 0.2.6.0
copyPermissions :: MonadIO m => FilePath -> FilePath -> m () Source #
Lifted
copyPermissions
.
Since: 0.2.6.0
Timestamps
getAccessTime :: MonadIO m => FilePath -> m UTCTime Source #
Lifted
getAccessTime
.
Since: 0.2.6.0
getModificationTime :: MonadIO m => FilePath -> m UTCTime Source #
Lifted
getModificationTime
.
Since: 0.2.6.0
setAccessTime :: MonadIO m => FilePath -> UTCTime -> m () Source #
Lifted
setAccessTime
.
Since: 0.2.6.0
setModificationTime :: MonadIO m => FilePath -> UTCTime -> m () Source #
Lifted
setModificationTime
.
Since: 0.2.6.0