The fs module enables interacting with the file system in a way modeled on standard POSIX functions.
fs
To use the promise-based APIs:
import * as fs from 'fs/promises';
To use the callback and sync APIs:
import * as fs from 'fs';
All file system operations have synchronous and callback forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
Generated using TypeDoc
The
fs
module enables interacting with the file system in a way modeled on standard POSIX functions.To use the promise-based APIs:
To use the callback and sync APIs:
All file system operations have synchronous and callback forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).