mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-18 06:19:47 +08:00
Add stubs for aiofiles.os.path (#6787)
This commit is contained in:
@@ -4,10 +4,12 @@ from asyncio.events import AbstractEventLoop
|
||||
from os import stat_result
|
||||
from typing import Any, Sequence, Union, overload
|
||||
|
||||
from . import ospath as path
|
||||
|
||||
_FdOrAnyPath = Union[int, StrOrBytesPath]
|
||||
|
||||
async def stat(
|
||||
path: _FdOrAnyPath,
|
||||
path: _FdOrAnyPath, # noqa: F811
|
||||
*,
|
||||
dir_fd: int | None = ...,
|
||||
follow_symlinks: bool = ...,
|
||||
@@ -33,16 +35,21 @@ async def replace(
|
||||
executor: Any = ...,
|
||||
) -> None: ...
|
||||
async def remove(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ... # noqa: F811
|
||||
) -> None: ...
|
||||
async def mkdir(
|
||||
path: StrOrBytesPath, mode: int = ..., *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
path: StrOrBytesPath, # noqa: F811
|
||||
mode: int = ...,
|
||||
*,
|
||||
dir_fd: int | None = ...,
|
||||
loop: AbstractEventLoop | None = ...,
|
||||
executor: Any = ..., # noqa: F811
|
||||
) -> None: ...
|
||||
async def makedirs(
|
||||
name: StrOrBytesPath, mode: int = ..., exist_ok: bool = ..., *, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
) -> None: ...
|
||||
async def rmdir(
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
path: StrOrBytesPath, *, dir_fd: int | None = ..., loop: AbstractEventLoop | None = ..., executor: Any = ... # noqa: F811
|
||||
) -> None: ...
|
||||
async def removedirs(name: StrOrBytesPath, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> None: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from asyncio.events import AbstractEventLoop
|
||||
from typing import Any
|
||||
|
||||
async def exists(path: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
||||
async def isfile(path: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
||||
async def isdir(s: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
||||
async def getsize(filename: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> int: ...
|
||||
async def getmtime(filename: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> float: ...
|
||||
async def getatime(filename: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> float: ...
|
||||
async def getctime(filename: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> float: ...
|
||||
async def samefile(
|
||||
f1: StrOrBytesPath | int, f2: StrOrBytesPath | int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...
|
||||
) -> bool: ...
|
||||
async def sameopenfile(fp1: int, fp2: int, *, loop: AbstractEventLoop | None = ..., executor: Any = ...) -> bool: ...
|
||||
Reference in New Issue
Block a user