Gives you history of files opened by NodeJS.
Works by wrapping
openSync methods in the fs
module. Dirty, I know, but sometimes useful.
The module exposes one
init function which initialises the
history. Optional argument: list of methods to wrap in the fs
init returns the
drain gives you list of files read since the last
call. Clears the internal list of files read.
init can be called multiple times creating multiple independent
var history = require("fs-history"); var fs = require("fs"); var drain = history(); // … read some files here … var file_paths = drain();
MIT License, see COPYING