Improve os.stat docs

This commit is contained in:
thetazero 2022-08-29 13:01:11 -07:00 committed by GitHub
parent 142c3a4fb9
commit f5286b4e79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -166,6 +166,20 @@ MP_DEFINE_CONST_FUN_OBJ_1(os_rmdir_obj, os_rmdir);
//| def stat(path: str) -> Tuple[int, int, int, int, int, int, int, int, int, int]:
//| """Get the status of a file or directory.
//|
//| Returns a tuple with the status of a file or directory in the following order,
//|
//|
//| * ``st_mode`` -- File type, regular or directory
//| * ``st_ino`` -- Unpopulated
//| * ``st_dev`` -- Unpopulated
//| * ``st_nlink`` -- Unpopulated
//| * ``st_uid`` -- Unpopulated
//| * ``st_gid`` -- Unpopulated
//| * ``st_size`` -- Size of the file in bytes
//| * ``st_atime`` -- Time of most recent access expressed in seconds
//| * ``st_mtime`` -- Time of most recent content modification expressed in seconds.
//| * ``st_ctime`` -- Time of most recent content modification expressed in seconds.
//|
//| .. note:: On builds without long integers, the number of seconds
//| for contemporary dates will not fit in a small integer.
//| So the time fields return 946684800,