Safe Haskell | None |
---|
Module implementing plumbing to get a unified path locator,
handling URI & local path. Implement the GraphPath
and GraphWalker
typeclass with HxtNode
- data ResourcePath
- rezPathToString :: ResourcePath -> String
- downloadBinary :: (Monad m, IOMockable m) => Loggers m -> URI -> m (URI, Response ByteString)
- accessResourcePath :: (Monad m, IOMockable m, Functor m) => Loggers m -> ResourcePath -> m (AccessResult a ResourcePath)
- rawLoadData :: (Monad m, IOMockable m) => Loggers m -> ResourcePath -> m (Maybe ByteString)
Documentation
data ResourcePath Source
Main data type
rezPathToString :: ResourcePath -> StringSource
Given a ressource, transforme it to a string
representation. This function should be used instead
of the Show
instance, which is aimed at debugging
only.
downloadBinary :: (Monad m, IOMockable m) => Loggers m -> URI -> m (URI, Response ByteString)Source
Helper function to grab a resource on internet and returning it's binary representation, and it's real place if any.
accessResourcePath :: (Monad m, IOMockable m, Functor m) => Loggers m -> ResourcePath -> m (AccessResult a ResourcePath)Source
rawLoadData :: (Monad m, IOMockable m) => Loggers m -> ResourcePath -> m (Maybe ByteString)Source
Extract a blob of data from a resourcepath and return the result.