4.0.0 • Published 2 years ago

getdents v4.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years 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

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

5 years ago

2.0.5

5 years ago

2.0.6

5 years ago

2.0.3

5 years ago

2.0.4

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.1

8 years ago