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 authored and Michaël Zasso committed 2025-07-17 16:57:14 +02:00
1 parent 999b5e51e7
commit 2d1dcb87e6
1 file changed
+4 -2
+4 -2
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>