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