partoffile

0.0.3 • Public • Published

partoffile

Meh. Read part of file. Mostly because current way of doing it is too cumbersome.

Installation

$ npm install partoffile

Usage

Function takes 4 parameters :

  • path to file you want to read
  • position from where to start reading
  • position till where to read
  • callback

Callback gets a buffer which can be used however.

Example

var file = require('partoffile');

file('test.txt', 0, 10, function(err, buffer) {
	if(err) throw err;
	console.log(buffer.toString('utf8'));
});

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    5
  • 0.0.2
    2
  • 0.1.0
    2
  • 0.0.1
    3
  • 0.0.0
    2

Package Sidebar

Install

npm i partoffile

Weekly Downloads

8

Version

0.0.3

License

MIT

Last publish

Collaborators

  • yolosub