Skip to content

Commit 00c1fc6

Browse files
Alex Marchdpgeorge
authored andcommitted
docs/uos: Add uos.statvfs() documentation.
1 parent 82af4d6 commit 00c1fc6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/library/uos.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ Functions
6161

6262
Get the status of a file or directory.
6363

64+
.. only:: port_unix or port_pyboard or port_esp8266
65+
66+
.. function:: statvfs(path)
67+
68+
Get the status of a fileystem.
69+
70+
Returns a tuple with the filesystem information in the following order:
71+
72+
* ``f_bsize`` -- file system block size
73+
* ``f_frsize`` -- fragment size
74+
* ``f_blocks`` -- size of fs in f_frsize units
75+
* ``f_bfree`` -- number of free blocks
76+
* ``f_bavail`` -- number of free blocks for unpriviliged users
77+
* ``f_files`` -- number of inodes
78+
* ``f_ffree`` -- number of free inodes
79+
* ``f_favail`` -- number of free inodes for unpriviliged users
80+
* ``f_flag`` -- mount flags
81+
* ``f_namemax`` -- maximum filename length
82+
83+
Parameters related to inodes: ``f_files``, ``f_ffree``, ``f_avail``
84+
and the ``f_flags`` parameter may return ``0`` as they can be unavailable
85+
in a port-specific implementation.
86+
6487
.. function:: sync()
6588

6689
Sync all filesystems.

0 commit comments

Comments
 (0)