# folder-stat

> Run fs.stat on every file in a directory

Latest version **1.0.1** (published 2014-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install folder-stat
pnpm add folder-stat
yarn add folder-stat
bun add folder-stat
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-05-20 |
| First published | 2014-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Josh Oldenburg |
| Maintainers | joshthegeek |
| Keywords | fs, fs-stat, folder-stat |

## Links

- npm: https://www.npmjs.com/package/folder-stat
- Repository: https://github.com/JoshTheGeek/node-folder-stat
- Issues: https://github.com/JoshTheGeek/node-folder-stat/issues
- npm.io page: https://npm.io/package/folder-stat

## Dependencies (1)

- [batch](https://npm.io/package/batch.md) ^0.5.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-05-20

## README

node-folder-stat [![Build Status](https://travis-ci.org/JoshTheGeek/node-folder-stat.svg?branch=master)](https://travis-ci.org/JoshTheGeek/node-folder-stat)
================

Run `fs.stat` on every file in a directory.

This returns an array of filenames and an array of stats with correlating indexes.

This is based on code from [`serve-index`](https://github.com/expressjs/serve-index/blob/master/index.js#L347-359).

## Example
```js
var stat = require('folder-stat');
stat('/bin', function(err, stats, files) {
	console.log(stats);
	console.log(files);
});
```

yields:
```js
[
	{
		dev: 16777218,
		mode: 33261,
		nlink: 2,
		uid: 0,
		gid: 0,
		rdev: 0,
		blksize: 4096,
		ino: 17824241,
		size: 18576,
		blocks: 16,
		atime: "Sun May 18 2014 21:23:45 GMT-0400 (EDT)",
		mtime: "Wed Oct 23 2013 19:18:48 GMT-0400 (EDT)",
		ctime: "Wed Oct 23 2013 19:18:48 GMT-0400 (EDT)"
	},
	{
		dev: 16777218,
		mode: 33133,
		nlink: 1,
		uid: 0,
		gid: 0,
		rdev: 0,
		blksize: 4096,
		ino: 17823135,
		size: 1228240,
		blocks: 1208,
		atime: "Mon May 19 2014 20:07:38 GMT-0400 (EDT)",
		mtime: "Wed Oct 23 2013 19:18:43 GMT-0400 (EDT)",
		ctime: "Wed Oct 23 2013 19:18:43 GMT-0400 (EDT)"
	},
	...
]

[
	'bash',
	'cat',
	...
]
```

---
_Source: https://npm.io/package/folder-stat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
