Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/upath/_info.py: 61%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import annotations
3from typing import TYPE_CHECKING
5from upath.types import PathInfo
7if TYPE_CHECKING:
8 from upath import UPath
11__all__ = [
12 "UPathInfo",
13]
16class UPathInfo(PathInfo):
17 """Path info for UPath objects."""
19 def __init__(self, path: UPath) -> None:
20 self._path = path.path
21 self._fs = path.fs
23 def exists(self, *, follow_symlinks=True) -> bool:
24 return self._fs.exists(self._path)
26 def is_dir(self, *, follow_symlinks=True) -> bool:
27 return self._fs.isdir(self._path)
29 def is_file(self, *, follow_symlinks=True) -> bool:
30 return self._fs.isfile(self._path)
32 def is_symlink(self) -> bool:
33 return False