# isaacs/node-graceful-fs

fs with incremental backoff on EMFILE

Repository: https://github.com/isaacs/node-graceful-fs
Canonical: https://ross.abutalabs.com/products/node-graceful-fs
Language: JavaScript
License: BlueOak-1.0.0
License Family: other
Last push: 2025-10-25T19:00:09+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 48, release rhythm 35, longevity 100
- inputs: {"age_days": 5523, "days_push": 312, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1302, forks 149 (observed 2026-08-28T04:04:18.070443+00:00)

## What it is
graceful-fs is a drop-in replacement for Node.js's fs module that makes filesystem access more resilient. It queues and retries open/readdir calls on EMFILE errors and normalizes cross-platform behavior differences.

## Use cases
- avoid EMFILE crashes when opening many files at once
- retry file reads on EAGAIN errors
- handle Windows rename failures caused by antivirus locks
- patch the global fs module for an entire application
- normalize fs behavior across Node versions and platforms

## When to choose
- your Node app hits EMFILE errors from too many concurrent file descriptors
- you want a drop-in fs replacement with resilient retry behavior
- you need to gracefully handle fs errors across platforms

## When to avoid
- you rely heavily on sync fs methods, which cannot be intercepted
- you want to call gracefulify inside a library rather than the top-level app
- you need zero behavioral changes to core Node APIs

## Facets
- artifact type: library
- maturity: stable
- function: file-system, error-handling, concurrency
- domain: developer-tools, files, backend
- platform: cross-platform
- tags: fs, emfile, drop-in-replacement, retry, monkey-patching, nodejs

## Member repositories
- isaacs/node-graceful-fs (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:18.070443+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:52:09.753537+00:00, confidence not recorded.
  - readme: https://github.com/isaacs/node-graceful-fs (fetched 2026-08-28T04:04:18.070443+00:00, sha 6c2e15a1a368)
- Data as of 2026-08-30T08:39:29.467469+00:00.
