Skip to content

Commit 2d1dcb8

Browse files
haramjtargos
authored andcommitted
doc: clarify ERR_FS_FILE_TOO_LARGE to reflect fs.readFile() I/O limit
PR-URL: #59050 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
1 parent 999b5e5 commit 2d1dcb8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/errors.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,8 +1362,10 @@ Path is a directory.
13621362

13631363
### `ERR_FS_FILE_TOO_LARGE`
13641364

1365-
An attempt has been made to read a file whose size is larger than the maximum
1366-
allowed size for a `Buffer`.
1365+
An attempt was made to read a file larger than the supported 2 GiB limit for
1366+
`fs.readFile()`. This is not a limitation of `Buffer`, but an internal I/O constraint.
1367+
For handling larger files, consider using `fs.createReadStream()` to read the
1368+
file in chunks.
13671369

13681370
<a id="ERR_FS_WATCH_QUEUE_OVERFLOW"></a>
13691371

0 commit comments

Comments
 (0)