mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
27
stdlib/genericpath.pyi
Normal file
27
stdlib/genericpath.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
import sys
|
||||
from typing import AnyStr, Sequence, Text, Union
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
def commonprefix(m: Sequence[str]) -> str: ...
|
||||
|
||||
else:
|
||||
def commonprefix(m: Sequence[AnyStr]) -> AnyStr: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
from builtins import _PathLike
|
||||
def exists(path: Union[AnyStr, _PathLike[AnyStr]]) -> bool: ...
|
||||
|
||||
else:
|
||||
def exists(path: Text) -> bool: ...
|
||||
|
||||
def isfile(path: Text) -> bool: ...
|
||||
def isdir(s: Text) -> bool: ...
|
||||
def getsize(filename: Text) -> int: ...
|
||||
def getmtime(filename: Text) -> float: ...
|
||||
def getatime(filename: Text) -> float: ...
|
||||
def getctime(filename: Text) -> float: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
def samestat(s1: str, s2: str) -> int: ...
|
||||
def samefile(f1: str, f2: str) -> int: ...
|
||||
def sameopenfile(fp1: str, fp2: str) -> int: ...
|
||||
Reference in New Issue
Block a user