From a855c741835380db3f9dc2b319e4d408c3d4a250 Mon Sep 17 00:00:00 2001 From: Steven Schveighoffer Date: Wed, 7 Sep 2022 11:19:08 -0400 Subject: [PATCH] doc: add note about offset -1 in uv_fs_read/write (#3677) --- docs/src/fs.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/fs.rst b/docs/src/fs.rst index 0bf2abed..e6e7088e 100644 --- a/docs/src/fs.rst +++ b/docs/src/fs.rst @@ -218,7 +218,8 @@ API .. c:function:: int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb) - Equivalent to :man:`preadv(2)`. + Equivalent to :man:`preadv(2)`. If the `offset` argument is `-1`, then + the current file offset is used and updated. .. warning:: On Windows, under non-MSVC environments (e.g. when GCC or Clang is used @@ -231,7 +232,8 @@ API .. c:function:: int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb) - Equivalent to :man:`pwritev(2)`. + Equivalent to :man:`pwritev(2)`. If the `offset` argument is `-1`, then + the current file offset is used and updated. .. warning:: On Windows, under non-MSVC environments (e.g. when GCC or Clang is used