4.0.0 • Published 6 months ago

getdents v4.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 months ago

This is a Node.js module for calling getdents64 on Linux from Javascript.

You might want to use this instead of fs.readdir if you have a directory containing many files.

API documentation is available here.

Example

List regular files in /tmp:

const fs = require('fs'),
      assert = require('assert'),
      Getdents = require('getdents').Getdents;

fs.open('/tmp', 'r', async function (err, fd)
{
    assert.ifError(err);

    let getdents = new Getdents(1024 * 1024, fd);

    for await (let _ of getdents)
    {
        if (getdents.type === Getdents.DT_REG)
        {
            console.log(getdents.name);
        }
    }
});

Install

npm install getdents

Licence

MIT

Test

grunt test

Coverage

grunt coverage

LCOV results are available here.

Coveralls page is here.

4.0.0

6 months ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

4 years ago

2.0.5

4 years ago

2.0.6

4 years ago

2.0.3

4 years ago

2.0.4

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago

0.0.1

7 years ago