mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Re-export more os functions in posix, tweak availability on linux (#6529)
This commit is contained in:
@@ -575,8 +575,6 @@ if sys.platform != "win32":
|
||||
# Unix only
|
||||
def fchmod(fd: int, mode: int) -> None: ...
|
||||
def fchown(fd: int, uid: int, gid: int) -> None: ...
|
||||
if sys.platform != "darwin":
|
||||
def fdatasync(fd: FileDescriptorLike) -> None: ... # Unix only, not Mac
|
||||
def fpathconf(__fd: int, __name: str | int) -> int: ...
|
||||
def fstatvfs(__fd: int) -> statvfs_result: ...
|
||||
def get_blocking(__fd: int) -> bool: ...
|
||||
@@ -584,7 +582,8 @@ if sys.platform != "win32":
|
||||
def lockf(__fd: int, __command: int, __length: int) -> None: ...
|
||||
def openpty() -> tuple[int, int]: ... # some flavors of Unix
|
||||
if sys.platform != "darwin":
|
||||
def pipe2(flags: int) -> tuple[int, int]: ... # some flavors of Unix
|
||||
def fdatasync(fd: FileDescriptorLike) -> None: ...
|
||||
def pipe2(__flags: int) -> tuple[int, int]: ... # some flavors of Unix
|
||||
def posix_fallocate(fd: int, offset: int, length: int) -> None: ...
|
||||
def posix_fadvise(fd: int, offset: int, length: int, advice: int) -> None: ...
|
||||
def pread(__fd: int, __length: int, __offset: int) -> bytes: ...
|
||||
@@ -632,17 +631,14 @@ def getcwd() -> str: ...
|
||||
def getcwdb() -> bytes: ...
|
||||
def chmod(path: _FdOrAnyPath, mode: int, *, dir_fd: int | None = ..., follow_symlinks: bool = ...) -> None: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
if sys.platform != "win32" and sys.platform != "linux":
|
||||
def chflags(path: StrOrBytesPath, flags: int, follow_symlinks: bool = ...) -> None: ... # some flavors of Unix
|
||||
def chown(
|
||||
path: _FdOrAnyPath, uid: int, gid: int, *, dir_fd: int | None = ..., follow_symlinks: bool = ...
|
||||
) -> None: ... # Unix only
|
||||
|
||||
if sys.platform != "win32":
|
||||
# Unix only
|
||||
def chroot(path: StrOrBytesPath) -> None: ...
|
||||
def lchflags(path: StrOrBytesPath, flags: int) -> None: ...
|
||||
def lchmod(path: StrOrBytesPath, mode: int) -> None: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
def chroot(path: StrOrBytesPath) -> None: ...
|
||||
def chown(path: _FdOrAnyPath, uid: int, gid: int, *, dir_fd: int | None = ..., follow_symlinks: bool = ...) -> None: ...
|
||||
def lchown(path: StrOrBytesPath, uid: int, gid: int) -> None: ...
|
||||
|
||||
def link(
|
||||
|
||||
Reference in New Issue
Block a user