Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is intended primarily to be a drop-in testing mock for VFS implementations, but you may also find it useful within your program if you want to work with some hierarchically-organized data.
Individual read and write operations are atomic.
The FilePath
values used in this VFS are split using splitPath
and joined using </>
, but are otherwise used directly: there is no concept of
paths being "relative" or "absolute" for this VFS. It is also possible for a file and a directory to have the same name, since directories names
are appended with /
, as per splitPath
. (This implementation detail is up for debate and may be changed in a future major release: please file
an issue if you want to have a discussion around it.)
Synopsis
- data PureVFS m a
- runPureVFS :: PureVFS m a -> m (a, PNode)
- runPureVFS' :: Monad m => PureVFS m a -> m PNode
- runPureVFS_ :: Monad m => PureVFS m a -> m ()
Documentation
The basic implementation of the VFS.
Instances
runPureVFS :: PureVFS m a -> m (a, PNode) Source #
Given a PureVFS
, run it in the local monad and return both the monadic return value and the root node of the VFS.