@@ -341,6 +341,11 @@ class stat_result(structseq[float], tuple[int, int, int, int, int, int, int, flo
341
341
if sys .version_info >= (3 , 8 ):
342
342
@property
343
343
def st_reparse_tag (self ) -> int : ...
344
+ if sys .version_info >= (3 , 12 ):
345
+ @property
346
+ def st_birthtime (self ) -> float : ... # time of file creation in seconds
347
+ @property
348
+ def st_birthtime_ns (self ) -> int : ... # time of file creation in nanoseconds
344
349
else :
345
350
@property
346
351
def st_blocks (self ) -> int : ... # number of blocks allocated for file
@@ -349,13 +354,13 @@ class stat_result(structseq[float], tuple[int, int, int, int, int, int, int, flo
349
354
@property
350
355
def st_rdev (self ) -> int : ... # type of device if an inode device
351
356
if sys .platform != "linux" :
352
- # These properties are available on MacOS, but not on Windows or Ubuntu.
357
+ # These properties are available on MacOS, but not Ubuntu.
353
358
# On other Unix systems (such as FreeBSD), the following attributes may be
354
359
# available (but may be only filled out if root tries to use them):
355
360
@property
356
361
def st_gen (self ) -> int : ... # file generation number
357
362
@property
358
- def st_birthtime (self ) -> int : ... # time of file creation
363
+ def st_birthtime (self ) -> float : ... # time of file creation in seconds
359
364
if sys .platform == "darwin" :
360
365
@property
361
366
def st_flags (self ) -> int : ... # user defined flags for file
@@ -616,13 +621,15 @@ def open(path: StrOrBytesPath, flags: int, mode: int = 0o777, *, dir_fd: int | N
616
621
def pipe () -> tuple [int , int ]: ...
617
622
def read (__fd : int , __length : int ) -> bytes : ...
618
623
624
+ if sys .version_info >= (3 , 12 ) or sys .platform != "win32" :
625
+ def get_blocking (__fd : int ) -> bool : ...
626
+ def set_blocking (__fd : int , __blocking : bool ) -> None : ...
627
+
619
628
if sys .platform != "win32" :
620
629
def fchmod (fd : int , mode : int ) -> None : ...
621
630
def fchown (fd : int , uid : int , gid : int ) -> None : ...
622
631
def fpathconf (__fd : int , __name : str | int ) -> int : ...
623
632
def fstatvfs (__fd : int ) -> statvfs_result : ...
624
- def get_blocking (__fd : int ) -> bool : ...
625
- def set_blocking (__fd : int , __blocking : bool ) -> None : ...
626
633
def lockf (__fd : int , __command : int , __length : int ) -> None : ...
627
634
def openpty () -> tuple [int , int ]: ... # some flavors of Unix
628
635
if sys .platform != "darwin" :
@@ -1044,3 +1051,8 @@ if sys.version_info >= (3, 9):
1044
1051
1045
1052
if sys .platform == "linux" :
1046
1053
def pidfd_open (pid : int , flags : int = ...) -> int : ...
1054
+
1055
+ if sys .version_info >= (3 , 12 ) and sys .platform == "win32" :
1056
+ def listdrives () -> list [str ]: ...
1057
+ def listmounts (volume : str ) -> list [str ]: ...
1058
+ def listvolumes () -> list [str ]: ...
0 commit comments