10000 Improve os.stat docs · pepijndevos/circuitpython@f5286b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit f5286b4

Browse files
authored
Improve os.stat docs
1 parent 142c3a4 commit f5286b4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

shared-bindings/os/__init__.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,20 @@ MP_DEFINE_CONST_FUN_OBJ_1(os_rmdir_obj, os_rmdir);
166166
//| def stat(path: str) -> Tuple[int, int, int, int, int, int, int, int, int, int]:
167167
//| """Get the status of a file or directory.
168168
//|
169+
//| Returns a tuple with the status of a file or directory in the following order,
170+
//|
171+
//|
172+
//| * ``st_mode`` -- File type, regular or directory
173+
//| * ``st_ino`` -- Unpopulated
174+
//| * ``st_dev`` -- Unpopulated
175+
//| * ``st_nlink`` -- Unpopulated
176+
//| * ``st_uid`` -- Unpopulated
177+
//| * ``st_gid`` -- Unpopulated
178+
//| * ``st_size`` -- Size of the file in bytes
179+
//| * ``st_atime`` -- Time of most recent access expressed in seconds
180+
//| * ``st_mtime`` -- Time of most recent content modification expressed in seconds.
181+
//| * ``st_ctime`` -- Time of most recent content modification expressed in seconds.
182+
//|
169183
//| .. note:: On builds without long integers, the number of seconds
170184
//| for contemporary dates will not fit in a small integer.
171185
//| So the time fields return 946684800,

0 commit comments

Comments
 (0)
0