summaryrefslogtreecommitdiff
path: root/deps/uv/docs/src/fs.rst
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-08-09 11:03:55 -0400
committercjihrig <cjihrig@gmail.com>2019-08-11 11:22:01 -0400
commitce7f3ed13ca15ae4c166d922e7ee39ad2ef41abb (patch)
treef25ca8d612ee2bdfb78f2bac31439633dfb2bb3d /deps/uv/docs/src/fs.rst
parent8ef68e66d0465441a79a5dae22e480bf0d83ed25 (diff)
downloadandroid-node-v8-ce7f3ed13ca15ae4c166d922e7ee39ad2ef41abb.tar.gz
android-node-v8-ce7f3ed13ca15ae4c166d922e7ee39ad2ef41abb.tar.bz2
android-node-v8-ce7f3ed13ca15ae4c166d922e7ee39ad2ef41abb.zip
deps: upgrade to libuv 1.31.0
Notable changes: - UV_FS_O_FILEMAP has been added for faster access to memory mapped files on Windows. - uv_fs_mkdir() now returns UV_EINVAL for invalid filenames on Windows. It previously returned UV_ENOENT. - The uv_fs_statfs() API has been added. - The uv_os_environ() and uv_os_free_environ() APIs have been added. Fixes: https://github.com/nodejs/node/issues/28599 Fixes: https://github.com/nodejs/node/issues/28945 Fixes: https://github.com/nodejs/node/issues/29008 PR-URL: https://github.com/nodejs/node/pull/29070 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/uv/docs/src/fs.rst')
-rw-r--r--deps/uv/docs/src/fs.rst47
1 files changed, 47 insertions, 0 deletions
diff --git a/deps/uv/docs/src/fs.rst b/deps/uv/docs/src/fs.rst
index 996624b695..aabe49b3f3 100644
--- a/deps/uv/docs/src/fs.rst
+++ b/deps/uv/docs/src/fs.rst
@@ -102,6 +102,24 @@ Data types
UV_FS_CLOSEDIR
} uv_fs_type;
+.. c:type:: uv_statfs_t
+
+ Reduced cross platform equivalent of ``struct statfs``.
+ Used in :c:func:`uv_fs_statfs`.
+
+ ::
+
+ typedef struct uv_statfs_s {
+ uint64_t f_type;
+ uint64_t f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ uint64_t f_spare[4];
+ } uv_statfs_t;
+
.. c:type:: uv_dirent_t
Cross platform (reduced) equivalent of ``struct dirent``.
@@ -200,6 +218,11 @@ API
Equivalent to :man:`preadv(2)`.
+ .. warning::
+ On Windows, under non-MSVC environments (e.g. when GCC or Clang is used
+ to build libuv), files opened using ``UV_FS_O_FILEMAP`` may cause a fatal
+ crash if the memory mapped read operation fails.
+
.. c:function:: int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
Equivalent to :man:`unlink(2)`.
@@ -208,6 +231,11 @@ API
Equivalent to :man:`pwritev(2)`.
+ .. warning::
+ On Windows, under non-MSVC environments (e.g. when GCC or Clang is used
+ to build libuv), files opened using ``UV_FS_O_FILEMAP`` may cause a fatal
+ crash if the memory mapped write operation fails.
+
.. c:function:: int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
Equivalent to :man:`mkdir(2)`.
@@ -290,6 +318,17 @@ API
Equivalent to :man:`stat(2)`, :man:`fstat(2)` and :man:`lstat(2)` respectively.
+.. c:function:: int uv_fs_statfs(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
+
+ Equivalent to :man:`statfs(2)`. On success, a `uv_statfs_t` is allocated
+ and returned via `req->ptr`. This memory is freed by `uv_fs_req_cleanup()`.
+
+ .. note::
+ Any fields in the resulting `uv_statfs_t` that are not supported by the
+ underlying operating system are set to zero.
+
+ .. versionadded:: 1.31.0
+
.. c:function:: int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb)
Equivalent to :man:`rename(2)`.
@@ -534,6 +573,14 @@ File open constants
.. versionchanged:: 1.17.0 support is added for Windows.
+.. c:macro:: UV_FS_O_FILEMAP
+
+ Use a memory file mapping to access the file. When using this flag, the
+ file cannot be open multiple times concurrently.
+
+ .. note::
+ `UV_FS_O_FILEMAP` is only supported on Windows.
+
.. c:macro:: UV_FS_O_NOATIME
Do not update the file access time when the file is read.