darcs-2.16.5: a distributed, interactive, smart revision control system

Safe Haskell | Safe-Inferred
Language | Haskell2010

Darcs.Util.File

Contents

- Files and directories
- OS-dependent special directories

Synopsis

- getFileStatus :: FilePath -> IO (Maybe FileStatus)
- withCurrentDirectory :: FilePathLike p => p -> IO a -> IO a
- doesDirectoryReallyExist :: FilePath -> IO Bool
- removeFileMayNotExist :: FilePathLike p => p -> IO ()
- getRecursiveContents :: FilePath -> IO [FilePath]
- getRecursiveContentsFullPath :: FilePath -> IO [FilePath]
- xdgCacheDir :: IO (Maybe FilePath)
- osxCacheDir :: IO (Maybe FilePath)

# Files and directories

getFileStatus :: FilePath -> IO (Maybe FileStatus) #

withCurrentDirectory :: FilePathLike p => p -> IO a -> IO a #

doesDirectoryReallyExist :: FilePath -> IO Bool #

removeFileMayNotExist :: FilePathLike p => p -> IO () #

getRecursiveContents :: FilePath -> IO [FilePath] #

getRecursiveContents returns all files under topdir that aren't directories.

getRecursiveContentsFullPath :: FilePath -> IO [FilePath] #

getRecursiveContentsFullPath returns all files under topdir that aren't directories. Unlike getRecursiveContents this function returns the full path.

# OS-dependent special directories

xdgCacheDir :: IO (Maybe FilePath) #

xdgCacheDir returns the $XDG_CACHE_HOME environment variable, or `~/.cache` if undefined. See the FreeDesktop specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

osxCacheDir :: IO (Maybe FilePath) #

osxCacheDir assumes `~LibraryCaches/` exists.