positional read and write
Reading or writing a file at an explicit byte offset instead of wherever the previous operation stopped.
In more detail
It allows random access to large files and lets several operations target different parts of a file without affecting each other. It maps to the pread and pwrite system calls on Unix-like systems.
Related terms
- FileHandle — The object fs/promises open() returns for an open file, wrapping its file descriptor with promise-based read, write and close methods.
- byte offset — How far into a block of memory or a file something starts, counted in bytes from the beginning.
Taught in
- Asynchronous File I/O: node:fs/promises & Handles — Node.js Internals & Backend Services