aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-07-29 07:48:05 -1000
committercjihrig <cjihrig@gmail.com>2019-08-01 07:21:15 -1000
commitbf86d5fbaf603a508bb7762c5d7e5800499aca96 (patch)
tree2ce3a66ad363586cb115ce1ba2dc799a3809911c /docs/src
parent79c2d7405886c8171b268f40604d87b9e5dbdeab (diff)
downloadlibuv-bf86d5fbaf603a508bb7762c5d7e5800499aca96.tar.gz
libuv-bf86d5fbaf603a508bb7762c5d7e5800499aca96.zip
unix,win: add uv_fs_statfs()
Fixes: https://github.com/libuv/libuv/issues/2386 PR-URL: https://github.com/libuv/libuv/pull/2396 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/fs.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/src/fs.rst b/docs/src/fs.rst
index fb8105fb..deaf0b13 100644
--- a/docs/src/fs.rst
+++ b/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``.
@@ -290,6 +308,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)`.