No description, website, or topics provided.
Switch branches/tags
Nothing to show
Latest commit 210a8a7 Mar 5, 2014 @dominictarr dominictarr Merge pull request #2 from alexmiddeleer/master
Tweaked readme to make example a standalone program
Failed to load latest commit information.
examples examples Jul 23, 2012
test test destroy Jul 23, 2012
.gitignore initial Jul 23, 2012
LICENSE.APACHE2 add opensource Jul 23, 2012
LICENSE.MIT add opensource Jul 23, 2012
README.markdown Tweaked readme to make example a standalone program Mar 5, 2014
index.js fix destroy logic Jul 23, 2012
package.json 0.0.2 Jul 23, 2012



read a file backwards.

// Usage: node <thissnippet.js> <filename>
var fsR = require('fs-reverse')
  , filename = process.argv[2]

fsR(filename, {})

the file will be read from the tail end, split into lines, and emitted in reverse order.

default options are:

{ flags: 'r' //may only be 'r' or 'rx'
, mode: 0666
, bufferSize: 64 * 1024
, matcher: '\n' //may be a string or regular expression.

except for matcher, the options are a subset of createReadStream in fs

If matcher is a regular expression with a group, like /(\r?\n)/ then the split pattern will be perserved and emitted as a chunk.


MIT / Apache 2