[Haskell-cafe] withFile variant which takes a ByteString?

John Lato jwlato at gmail.com
Tue Jul 8 00:52:53 UTC 2014


On Tue, Jul 8, 2014 at 7:50 AM, Magnus Therning <magnus at therning.org> wrote:

> On Sat, Jul 05, 2014 at 05:52:30PM +0200, Bardur Arantsson wrote:
> > Hi all,
> >
> > Is there a variant of withFile which takes a ByteString?
> >
> > (I'm aware that I could use the lower-level System.Posix FD-based
> > functions, but if someone already has a package out there, I'd rather
> > not.)
>
> You might want to have a look at the Filesystem module, in
> system-fileio[^1].  It's not exactly what you ask for, but it seems to
> be a rather good way of dealing with filesystem paths.
>

Nothing against system-fileio, but it's pretty much the opposite of what
Bardur was asking for.  It doesn't use ByteStrings and adds even more
abstraction over the basic System.IO functions.  IMO there are exceedingly
few overlapping target cases between RawFilePath and system-fileio.

John L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140708/1b0e9ece/attachment.html>


More information about the Haskell-Cafe mailing list