12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- from pathlib import Path
- from dataclasses import dataclass
- from os import stat_result
- @dataclass
- class VirtualStats:
- st_mode: int
- st_ino: int
- st_dev: int
- st_nlink: int
- st_uid: int
- st_gid: int
- st_size: int
- st_atime: float
- st_mtime: float
- st_ctime: float
- @dataclass
- class VirtualPathEntry:
- is_dir: bool
- is_file: bool
- stat: stat_result
- class VirtualPath(Path):
- def cwd(self):
- pass
- def exists(self):
- pass
- def glob(self):
- pass
- def is_dir(self):
- pass
- def is_file(self):
- pass
- def iterdir(self):
- pass
- def lstat(self):
- return self.stat()
- def open(self):
- pass
- def stat(self):
- pass
- # ['__bytes__', '__class__', '__class_getitem__', '__delattr__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__',
- # '__fspath__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__',
- # '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rtruediv__', '__setattr__', '__sizeof__', '__slots__', '__str__',
- # '__subclasshook__', '__truediv__',
- # '_accessor', '_cached_cparts', '_cparts', '_drv', '_format_parsed_parts', '_from_parsed_parts', '_from_parts', '_hash', '_init',
- # '_make_child', '_make_child_relpath', '_opener', '_parse_args', '_parts', '_pparts', '_raw_open', '_root', '_str', 'absolute',
- # 'anchor', 'as_posix', 'as_uri', 'chmod', 'cwd', 'drive', 'exists', 'expanduser', 'glob', 'group', 'home', 'is_absolute',
- # 'is_block_device', 'is_char_device', 'is_dir', 'is_fifo', 'is_file', 'is_mount', 'is_relative_to', 'is_reserved', 'is_socket',
- # 'is_symlink', 'iterdir', 'joinpath', 'lchmod', 'link_to', 'lstat', 'match', 'mkdir', 'name', 'open', 'owner', 'parent', 'parents',
- # 'parts', 'read_bytes', 'read_text', 'readlink', 'relative_to', 'rename', 'replace', 'resolve', 'rglob', 'rmdir', 'root', 'samefile',
- # 'stat', 'stem', 'suffix', 'suffixes', 'symlink_to', 'touch', 'unlink', 'with_name', 'with_stem', 'with_suffix', 'write_bytes',
- # 'write_text']
|