knob: Memory-backed handles
Create memory-backed Handles, referencing virtual files. This is
mostly useful for testing Handle-based APIs without having to
interact with the filesystem.
import Data.ByteString (pack)
import Data.Knob
import System.IO
main = do
knob <- newKnob (pack [])
h <- newFileHandle knob "test.txt" WriteMode
hPutStrLn h "Hello world!"
hClose h
bytes <- Data.Knob.getContents knob
putStrLn ("Wrote bytes: " ++ show bytes)
Downloads
- knob-0.1.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1, 0.1.1, 0.2, 0.2.1, 0.2.2 |
|---|---|
| Dependencies | base (>=4.2 && <4.15), bytestring (>=0.9), transformers (>=0.2) [details] |
| License | MIT |
| Author | John Millikin <jmillikin@gmail.com> |
| Maintainer | John Millikin <jmillikin@gmail.com> |
| Uploaded | by JohnMillikin at 2012-04-08T18:48:04Z |
| Revised | Revision 1 made by Bodigrim at 2022-02-24T00:48:56Z |
| Category | System |
| Home page | https://john-millikin.com/software/knob/ |
| Bug tracker | mailto:jmillikin@gmail.com |
| Source repo | head: bzr branch https://john-millikin.com/software/knob/ this: bzr branch https://john-millikin.com/branches/knob/0.1/ -r knob_0.1.1 |
| Reverse Dependencies | 4 direct, 4 indirect [details] |
| Downloads | 7496 total (9 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |