phatsort-0.6.0.0: FAT filesystem sort utility
CopyrightCopyright (c) 2019-2023 Travis Cardwell
LicenseMIT
Safe HaskellSafe-Inferred
LanguageHaskell2010

PhatSort.Monad.FileSystem

Description

 
Synopsis

MonadFileSystem

class Monad m => MonadFileSystem m where Source #

Filesystem I/O

Since: 0.5.0.0

Methods

copyFile Source #

Arguments

:: FilePath

source

-> FilePath

destination

-> m (Either IOError ()) 

Copy a file

createDirectory :: FilePath -> m (Either IOError ()) Source #

Create a directory

doesPathExist :: FilePath -> m (Either IOError Bool) Source #

Check if a path exists

getFileStatus :: FilePath -> m (Either IOError FileStatus) Source #

Get file status information

listDirectory :: FilePath -> m (Either IOError [FilePath]) Source #

Get a list of directory entries

makeAbsolute :: FilePath -> m (Either IOError FilePath) Source #

Convert a path into an absolute path

removeDirectory :: FilePath -> m (Either IOError ()) Source #

Remove a directory

renameDirectory Source #

Arguments

:: FilePath

target directory

-> FilePath

new directory name

-> m (Either IOError ()) 

Rename a directory

renameFile Source #

Arguments

:: FilePath

target file

-> FilePath

new file name

-> m (Either IOError ()) 

Rename a file

Instances

Instances details
MonadFileSystem IO Source # 
Instance details

Defined in PhatSort.Monad.FileSystem

MonadFileSystem m => MonadFileSystem (ExceptT e m) Source # 
Instance details

Defined in PhatSort.Monad.FileSystem

FileStatus

data FileStatus Source #

Mockable subset of FileStatus

Since: 0.5.0.0