|
| 1 | +# Stubs for os.path |
| 2 | +# Ron Murawski <[email protected]> |
| 3 | + |
| 4 | +# based on http://docs.python.org/3.2/library/os.path.html |
| 5 | + |
| 6 | +from typing import Any, List, Tuple, IO |
| 7 | + |
| 8 | +# ----- os.path variables ----- |
| 9 | +supports_unicode_filenames = False |
| 10 | + |
| 11 | +# ----- os.path function stubs ----- |
| 12 | +def abspath(path: str) -> str: ... |
| 13 | +def basename(path) -> str: ... |
| 14 | +def commonprefix(list: List[str]) -> str: ... |
| 15 | +def dirname(path: str) -> str: ... |
| 16 | +def exists(path: str) -> bool: ... |
| 17 | +def lexists(path: str) -> bool: ... |
| 18 | +def expanduser(path: str) -> str: ... |
| 19 | +def expandvars(path: str) -> str: ... |
| 20 | +def getatime(path: str) -> int: |
| 21 | + ... # return float if os.stat_float_times() returns True |
| 22 | +def getmtime(path: str) -> int: |
| 23 | + ... # return float if os.stat_float_times() returns True |
| 24 | +def getctime(path: str) -> int: |
| 25 | + ... # return float if os.stat_float_times() returns True |
| 26 | +def getsize(path: str) -> int: ... |
| 27 | +def isabs(path: str) -> bool: ... |
| 28 | +def isfile(path: str) -> bool: ... |
| 29 | +def isdir(path: str) -> bool: ... |
| 30 | +def islink(path: str) -> bool: ... |
| 31 | +def ismount(path: str) -> bool: ... |
| 32 | +def join(path: str, *paths: str) -> str: ... |
| 33 | +def normcase(path: str) -> str: ... |
| 34 | +def normpath(path: str) -> str: ... |
| 35 | +def realpath(path: str) -> str: ... |
| 36 | +def relpath(path: str, start: str = ...) -> str: ... |
| 37 | +def samefile(path1: str, path2: str) -> bool: ... |
| 38 | + |
| 39 | +def sameopenfile(fp1: IO[Any], fp2: IO[Any]) -> bool: ... |
| 40 | + |
| 41 | +# def samestat(stat1: stat_result, stat2: stat_result) -> bool: |
| 42 | +# ... # Unix only |
| 43 | +def split(path: str) -> Tuple[str, str]: ... |
| 44 | +def splitdrive(path: str) -> Tuple[str, str]: ... |
| 45 | +def splitext(path: str) -> Tuple[str, str]: ... |
| 46 | +# def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated |
0 commit comments