doc: clarify ERR_FS_FILE_TOO_LARGE to reflect fs.readFile() I/O limit

PR-URL: https://github.com/nodejs/node/pull/59050
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
This commit is contained in:
Haram Jeong 2025-07-16 15:44:22 +09:00 committed by GitHub
parent 01af8acf1e
commit 9f486c35fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1362,8 +1362,10 @@ Path is a directory.
### `ERR_FS_FILE_TOO_LARGE`
An attempt has been made to read a file whose size is larger than the maximum
allowed size for a `Buffer`.
An attempt was made to read a file larger than the supported 2 GiB limit for
`fs.readFile()`. This is not a limitation of `Buffer`, but an internal I/O constraint.
For handling larger files, consider using `fs.createReadStream()` to read the
file in chunks.
<a id="ERR_FS_WATCH_QUEUE_OVERFLOW"></a>