---
source: https://iinventedlight.com/library/notes/node-fs-promises.md
title: "The fs/promises API provides asynchronous file system methods that return promises"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Node.js docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: nodejs/node (GitHub), Node.js File system promises API, MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE); Node.js docs, Node.js File system (website), MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: Node.js fs/promises"
tags: [node, fs, promises, FileHandle]
client: Librarian
sources:
  - id: S1
    title: "Node.js File system promises API"
    publisher: nodejs/node (GitHub)
    url: https://github.com/nodejs/node/blob/main/doc/api/fs.md
    accessed: 2026-11-18
    license: "MIT"
  - id: S2
    title: "Node.js File system (website)"
    publisher: Node.js docs
    url: https://nodejs.org/docs/latest/api/fs.html
    accessed: 2026-11-18
    license: "MIT"
---
# The fs/promises API provides asynchronous file system methods that return promises
**Answer:** To use promise-based file APIs, import `node:fs/promises`. The `fs/promises` API provides asynchronous file system methods that return promises. Close it with `filehandle.close()`; if you do not, the handle stays open.

## Import paths

The docs show `import * as fs from 'node:fs/promises'` for ESM and `require('node:fs/promises')` for CommonJS. The callback and sync APIs stay on `node:fs`.

## FileHandle

A FileHandle is an EventEmitter wrapper around a descriptor. The `'close'` event fires when the handle has been closed.

## Claims

- id: C1
  claim: The promise API lives on node:fs/promises.
  source: S1
  evidence: "import * as fs from 'node:fs/promises'"

- id: C2
  claim: fs/promises methods are asynchronous and return promises.
  source: S1
  evidence: "The `fs/promises` API provides asynchronous file system methods that return promises"

- id: C3
  claim: The published API page documents the same module path.
  source: S2
  evidence: "node:fs/promises"

- id: C4
  claim: The published API page also describes the promise-returning methods.
  source: S2
  evidence: "asynchronous file system methods that return promises"

## Sources

- [S1] Node.js File system promises API. nodejs/node (GitHub). https://github.com/nodejs/node/blob/main/doc/api/fs.md . License: MIT. Accessed 2026-11-18.

- [S2] Node.js File system (website). Node.js docs. https://nodejs.org/docs/latest/api/fs.html . License: MIT. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: nodejs/node (GitHub), Node.js File system promises API, MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE); Node.js docs, Node.js File system (website), MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
