
14 Mar
2007
14 Mar
'07
9:05 p.m.
Greg Fitzgerald wrote:
What we need is a library for a readonly filesystem. That is, all the same functions but pure. I believe you could make this readonly library by wrapping each readonly I/O function with 'unsafeInterleaveIO' or 'unsafePerformIO', but I don't really understand the consequences of using 'unsafe' calls, so I avoided it myself.
SlurpDirectory from darcs tries to do this. It is likely just specific to darcs needs, but perhaps it would be a useful thing. I've thought about making something like this for the purposes of harchive, but concluded that I need too much control over when things happen. Having a memory leak that tries to read an entire filesystem into memory isn't going to work well :-) Dave