Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sinkAppendFile usefule? #337

Open
angerman opened this issue Dec 18, 2017 · 1 comment
Open

sinkAppendFile usefule? #337

angerman opened this issue Dec 18, 2017 · 1 comment

Comments

@angerman
Copy link

While experimenting with conduit, I found sinkFile, but had more use for an actual singAppendFile. Would a PR with that make sense?

sinkAppendFile :: MonadResource m
               => FilePath
               -> Consumer ByteString m ()
sinkAppendFile fp = sinkIOHandle (IO.openBinaryFile fp IO.AppendMode)

Another thing I noticed was that while I emitted bytestrings ending in a newline, somehow
the first line in my output file ended up being blank. Has anyone else observed this?

@snoyberg
Copy link
Owner

Yeah, that can definitely make sense, PR welcome.

I've never observed the newline behavior you describe, if you put together a repro, I can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants