| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ed807bf commit b04b307
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -805,6 +805,46 @@ ABC hierarchy:: | |||
| 805 | 805 | ||
| 806 | 806 | .. versionadded:: 3.9 | |
| 807 | 807 | ||
| 808 | + .. abstractmethod:: name() | ||
| 809 | + | ||
| 810 | + The base name of this object without any parent references. | ||
| 811 | + | ||
| 812 | + .. abstractmethod:: iterdir() | ||
| 813 | + | ||
| 814 | + Yield Traversable objects in self. | ||
| 815 | + | ||
| 816 | + .. abstractmethod:: is_dir() | ||
| 817 | + | ||
| 818 | + Return True if self is a directory. | ||
| 819 | + | ||
| 820 | + .. abstractmethod:: is_file() | ||
| 821 | + | ||
| 822 | + Return True if self is a file. | ||
| 823 | + | ||
| 824 | + .. abstractmethod:: joinpath(child) | ||
| 825 | + | ||
| 826 | + Return Traversable child in self. | ||
| 827 | + | ||
| 828 | + .. abstractmethod:: __truediv__(child) | ||
| 829 | + | ||
| 830 | + Return Traversable child in self. | ||
| 831 | + | ||
| 832 | + .. abstractmethod:: open(mode='r', *args, **kwargs) | ||
| 833 | + | ||
| 834 | + *mode* may be 'r' or 'rb' to open as text or binary. Return a handle | ||
| 835 | + suitable for reading (same as :attr:`pathlib.Path.open`). | ||
| 836 | + | ||
| 837 | + When opening as text, accepts encoding parameters such as those | ||
| 838 | + accepted by :attr:`io.TextIOWrapper`. | ||
| 839 | + | ||
| 840 | + .. method:: read_bytes() | ||
| 841 | + | ||
| 842 | + Read contents of self as bytes. | ||
| 843 | + | ||
| 844 | + .. method:: read_text(encoding=None) | ||
| 845 | + | ||
| 846 | + Read contents of self as text. | ||
| 847 | + | ||
| 808 | 848 | ||
| 809 | 849 | .. class:: TraversableResources | |
| 810 | 850 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + Add protocol description to the :class:`importlib.abc.Traversable` | ||
| 2 | + documentation. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments