Source codeContentsIndex
FileSystem
Synopsis
data FileSystem
type FileSystemName = [String]
newFileSystem :: IO FileSystem
class HasFileSystem fileSystem where
getFileSystemLocation :: fileSystem -> FilePath
getFileSystemNameLocation :: (HasFileSystem fileSystem) => fileSystem -> FileSystemName -> FilePath
ensureFile :: FileSystem -> (FileSystemName -> FilePath -> IO ()) -> FileSystemName -> IO ()
ensureFiles :: FileSystem -> (FileSystemName -> FilePath -> IO ()) -> [FileSystemName] -> IO ()
Documentation
data FileSystem
type FileSystemName = [String]
This corresponds to a file name within the file system, with the top directory first.
newFileSystem :: IO FileSystem
Create a new empty file system
class HasFileSystem fileSystem where
Methods
getFileSystemLocation :: fileSystem -> FilePath
Instances
HasFileSystem FileSystem
getFileSystemNameLocation :: (HasFileSystem fileSystem) => fileSystem -> FileSystemName -> FilePath
ensureFile :: FileSystem -> (FileSystemName -> FilePath -> IO ()) -> FileSystemName -> IO ()
Ensure a particular file is present, calling the supplied action if necessary. This action should retrieve the object to the specified FilePath (which will be the real location of the object).
ensureFiles :: FileSystem -> (FileSystemName -> FilePath -> IO ()) -> [FileSystemName] -> IO ()
ensureFile for zero or more fileSystemNames.
Produced by Haddock version 0.3