LIO.Handle
Description
This module abstracts the basic FileHandle
methods provided by
the system library, and provides an LHandle
(Labeled Handle) type
that can be manipulated from within the LIO
Monad. Two lower
level functions, mkDir
and mkLHandle
may be useful for
functions that wish to open file names that are not relative to
rootDir
. (There is no notion of changeable current working
directory in the LIO
Monad.)
The actual storage of labeled files is handled by the LIO.FS module.
Documentation
class Monad m => DirectoryOps h m | m -> h whereSource
Methods
getDirectoryContents :: FilePath -> m [FilePath]Source
createDirectory :: FilePath -> m ()Source
Instances
DirectoryOps Handle IO | |
Label l => DirectoryOps (LHandle l Handle) (LIO l s) |
readFile :: (DirectoryOps h m, HandleOps h b m) => FilePath -> m bSource
writeFile :: (DirectoryOps h m, HandleOps h b m, OnExceptionTCB m) => FilePath -> b -> m ()Source