node-fake-fs icon indicating copy to clipboard operation
node-fake-fs copied to clipboard

Implement a 'fake' createReadStream

Open kdvolder opened this issue 12 years ago • 2 comments
trafficstars

Fake-fs as it is, is already quite useful. It would be even more useful if it implemented more of the node fs api.

One of the missing functions is 'createReadStream'.

As a first step it might already be useful to provide a mock implementation that emulates the Stream like interaction without truly needing to support true Streaming.

For example something similar to this:

https://github.com/scripted-editor/scripted/blob/dev/server/plugable-fs/scripted-fs.js#L367

kdvolder avatar Feb 22 '13 18:02 kdvolder

Yes, this is not beyond the scope. We can add it after new stream interface will be released. Don't think it is wise to bother with it right now

eldargab avatar Feb 22 '13 20:02 eldargab

@kdvolder take a look at https://github.com/Olegas/node-mockfs

Olegas avatar Sep 13 '13 13:09 Olegas