|
| 1 | +# Stubs for pathlib2 (Python 2) |
| 2 | +# |
| 3 | +# NOTE: This dynamically typed stub was automatically generated by stubgen. |
| 4 | + |
| 5 | +from typing import Any, AnyStr, Type, TypeVar, Optional, Union |
| 6 | +from collections import Sequence |
| 7 | + |
| 8 | +_P = TypeVar('_P', bound='PurePath') |
| 9 | + |
| 10 | +intern = ... # type: Any |
| 11 | +basestring = ... # type: Any |
| 12 | +supports_symlinks = ... # type: bool |
| 13 | +nt = ... # type: Any |
| 14 | + |
| 15 | +class _Flavour: |
| 16 | + join = ... # type: Any |
| 17 | + def __init__(self) -> None: ... |
| 18 | + def parse_parts(self, parts): ... |
| 19 | + def join_parsed_parts(self, drv, root, parts, drv2, root2, parts2): ... |
| 20 | + |
| 21 | +class _WindowsFlavour(_Flavour): |
| 22 | + sep = ... # type: str |
| 23 | + altsep = ... # type: str |
| 24 | + has_drv = ... # type: bool |
| 25 | + pathmod = ... # type: Any |
| 26 | + is_supported = ... # type: Any |
| 27 | + drive_letters = ... # type: Any |
| 28 | + ext_namespace_prefix = ... # type: str |
| 29 | + reserved_names = ... # type: Any |
| 30 | + def splitroot(self, part, sep: Any = ...): ... |
| 31 | + def casefold(self, s): ... |
| 32 | + def casefold_parts(self, parts): ... |
| 33 | + def resolve(self, path): ... |
| 34 | + def is_reserved(self, parts): ... |
| 35 | + def make_uri(self, path): ... |
| 36 | + def gethomedir(self, username): ... |
| 37 | + |
| 38 | +class _PosixFlavour(_Flavour): |
| 39 | + sep = ... # type: str |
| 40 | + altsep = ... # type: str |
| 41 | + has_drv = ... # type: bool |
| 42 | + pathmod = ... # type: Any |
| 43 | + is_supported = ... # type: Any |
| 44 | + def splitroot(self, part, sep: Any = ...): ... |
| 45 | + def casefold(self, s): ... |
| 46 | + def casefold_parts(self, parts): ... |
| 47 | + def resolve(self, path): ... |
| 48 | + def is_reserved(self, parts): ... |
| 49 | + def make_uri(self, path): ... |
| 50 | + def gethomedir(self, username): ... |
| 51 | + |
| 52 | +class _Accessor: ... |
| 53 | + |
| 54 | +class _NormalAccessor(_Accessor): |
| 55 | + stat = ... # type: Any |
| 56 | + lstat = ... # type: Any |
| 57 | + open = ... # type: Any |
| 58 | + listdir = ... # type: Any |
| 59 | + chmod = ... # type: Any |
| 60 | + lchmod = ... # type: Any |
| 61 | + #def lchmod(self, pathobj, mode): ... |
| 62 | + mkdir = ... # type: Any |
| 63 | + unlink = ... # type: Any |
| 64 | + rmdir = ... # type: Any |
| 65 | + rename = ... # type: Any |
| 66 | + replace = ... # type: Any |
| 67 | + symlink = ... # type: Any |
| 68 | + #def symlink(a, b, target_is_directory): ... |
| 69 | + #@staticmethod |
| 70 | + #def symlink(a, b, target_is_directory): ... |
| 71 | + utime = ... # type: Any |
| 72 | + def readlink(self, path): ... |
| 73 | + |
| 74 | +class _Selector: |
| 75 | + child_parts = ... # type: Any |
| 76 | + successor = ... # type: Any |
| 77 | + def __init__(self, child_parts) -> None: ... |
| 78 | + def select_from(self, parent_path): ... |
| 79 | + |
| 80 | +class _TerminatingSelector: ... |
| 81 | + |
| 82 | +class _PreciseSelector(_Selector): |
| 83 | + name = ... # type: Any |
| 84 | + def __init__(self, name, child_parts) -> None: ... |
| 85 | + |
| 86 | +class _WildcardSelector(_Selector): |
| 87 | + pat = ... # type: Any |
| 88 | + def __init__(self, pat, child_parts) -> None: ... |
| 89 | + |
| 90 | +class _RecursiveWildcardSelector(_Selector): |
| 91 | + def __init__(self, pat, child_parts) -> None: ... |
| 92 | + |
| 93 | +class _PathParents(Sequence): |
| 94 | + def __init__(self, path) -> None: ... |
| 95 | + def __len__(self): ... |
| 96 | + def __getitem__(self, idx): ... |
| 97 | + |
| 98 | +class PurePath: |
| 99 | + def __new__(cls, *args): ... |
| 100 | + def __reduce__(self): ... |
| 101 | + def as_posix(self): ... |
| 102 | + def __bytes__(self): ... |
| 103 | + def as_uri(self) -> str: ... |
| 104 | + def __eq__(self, other): ... |
| 105 | + def __ne__(self, other): ... |
| 106 | + def __hash__(self): ... |
| 107 | + def __lt__(self, other): ... |
| 108 | + def __le__(self, other): ... |
| 109 | + def __gt__(self, other): ... |
| 110 | + def __ge__(self, other): ... |
| 111 | + drive = ... # type: Any |
| 112 | + root = ... # type: Any |
| 113 | + @property |
| 114 | + def anchor(self): ... |
| 115 | + @property |
| 116 | + def name(self): ... |
| 117 | + @property |
| 118 | + def suffix(self): ... |
| 119 | + @property |
| 120 | + def suffixes(self): ... |
| 121 | + @property |
| 122 | + def stem(self): ... |
| 123 | + def with_name(self, name): ... |
| 124 | + def with_suffix(self, suffix): ... |
| 125 | + def relative_to(self, *other): ... |
| 126 | + @property |
| 127 | + def parts(self): ... |
| 128 | + def joinpath(self, *args): ... |
| 129 | + def __truediv__(self, key): ... |
| 130 | + def __rtruediv__(self, key): ... |
| 131 | + __div__ = ... # type: Any |
| 132 | + __rdiv__ = ... # type: Any |
| 133 | + @property |
| 134 | + def parent(self): ... |
| 135 | + @property |
| 136 | + def parents(self): ... |
| 137 | + def is_absolute(self): ... |
| 138 | + def is_reserved(self): ... |
| 139 | + def match(self, path_pattern): ... |
| 140 | + |
| 141 | +class PurePosixPath(PurePath): ... |
| 142 | +class PureWindowsPath(PurePath): ... |
| 143 | + |
| 144 | +class Path(PurePath): |
| 145 | + def __new__(cls: Type[_P], *args: Union[AnyStr, PurePath], |
| 146 | + **kwargs: Any) -> _P: ... |
| 147 | + def __enter__(self): ... |
| 148 | + def __exit__(self, t, v, tb): ... |
| 149 | + @classmethod |
| 150 | + def cwd(cls): ... |
| 151 | + @classmethod |
| 152 | + def home(cls): ... |
| 153 | + def samefile(self, other_path): ... |
| 154 | + def iterdir(self): ... |
| 155 | + def glob(self, pattern): ... |
| 156 | + def rglob(self, pattern): ... |
| 157 | + def absolute(self): ... |
| 158 | + def resolve(self): ... |
| 159 | + def stat(self): ... |
| 160 | + def owner(self): ... |
| 161 | + def group(self): ... |
| 162 | + def open(self, mode: str = ..., buffering: int = ..., encoding: Optional[Any] = ..., errors: Optional[Any] = ..., newline: Optional[Any] = ...): ... |
| 163 | + def read_bytes(self): ... |
| 164 | + def read_text(self, encoding: Optional[Any] = ..., errors: Optional[Any] = ...): ... |
| 165 | + def write_bytes(self, data): ... |
| 166 | + def write_text(self, data, encoding: Optional[Any] = ..., errors: Optional[Any] = ...): ... |
| 167 | + def touch(self, mode: int = ..., exist_ok: bool = ...): ... |
| 168 | + def mkdir(self, mode: int = ..., parents: bool = ..., exist_ok: bool = ...): ... |
| 169 | + def chmod(self, mode): ... |
| 170 | + def lchmod(self, mode): ... |
| 171 | + def unlink(self): ... |
| 172 | + def rmdir(self): ... |
| 173 | + def lstat(self): ... |
| 174 | + def rename(self, target): ... |
| 175 | + def replace(self, target): ... |
| 176 | + def symlink_to(self, target, target_is_directory: bool = ...): ... |
| 177 | + def exists(self): ... |
| 178 | + def is_dir(self): ... |
| 179 | + def is_file(self): ... |
| 180 | + def is_symlink(self): ... |
| 181 | + def is_block_device(self): ... |
| 182 | + def is_char_device(self): ... |
| 183 | + def is_fifo(self): ... |
| 184 | + def is_socket(self): ... |
| 185 | + def expanduser(self): ... |
| 186 | + |
| 187 | +class PosixPath(Path, PurePosixPath): ... |
| 188 | +class WindowsPath(Path, PureWindowsPath): ... |
0 commit comments