• Home
  • Raw
  • Download

Lines Matching refs:PurePath

25          most basic class is PurePath, which has three direct subclasses:
116 .. class:: PurePath(*pathsegments)
121 >>> PurePath('setup.py') # Running on a Unix machine
129 >>> PurePath('foo', 'some/path', 'bar')
131 >>> PurePath(Path('foo'), Path('bar'))
136 >>> PurePath()
142 >>> PurePath('/etc', '/usr', 'lib64')
157 >>> PurePath('foo//bar')
159 >>> PurePath('//foo/bar')
161 >>> PurePath('foo/./bar')
163 >>> PurePath('foo/../bar')
178 A subclass of :class:`PurePath`, this path flavour represents non-Windows
184 *pathsegments* is specified similarly to :class:`PurePath`.
188 A subclass of :class:`PurePath`, this path flavour represents Windows
196 *pathsegments* is specified similarly to :class:`PurePath`.
238 >>> p = PurePath('/etc')
243 >>> q = PurePath('bin')
255 >>> p = PurePath('/etc')
263 >>> p = PurePath('/etc')
287 .. attribute:: PurePath.parts
291 >>> p = PurePath('/usr/bin/python3')
307 from pathlib import PurePath, PurePosixPath, PureWindowsPath
311 .. attribute:: PurePath.parser
318 .. attribute:: PurePath.drive
334 .. attribute:: PurePath.root
370 .. attribute:: PurePath.anchor
384 .. attribute:: PurePath.parents
400 .. attribute:: PurePath.parent
429 .. attribute:: PurePath.name
445 .. attribute:: PurePath.suffix
458 .. attribute:: PurePath.suffixes
470 .. attribute:: PurePath.stem
482 .. method:: PurePath.as_posix()
493 .. method:: PurePath.is_absolute()
513 .. method:: PurePath.is_relative_to(other)
517 >>> p = PurePath('/etc/passwd')
526 >>> u = PurePath('/usr')
537 .. method:: PurePath.is_reserved()
551 .. method:: PurePath.joinpath(*pathsegments)
566 .. method:: PurePath.full_match(pattern, *, case_sensitive=None)
571 >>> PurePath('a/b.py').full_match('a/*.py')
573 >>> PurePath('a/b.py').full_match('*.py')
575 >>> PurePath('/a/b/c.py').full_match('/a/**')
577 >>> PurePath('/a/b/c.py').full_match('**/*.py')
595 .. method:: PurePath.match(pattern, *, case_sensitive=None)
600 This method is similar to :meth:`~PurePath.full_match`, but empty patterns
605 >>> PurePath('a/b.py').match('*.py')
607 >>> PurePath('/a/b/c.py').match('b/*.py')
609 >>> PurePath('/a/b/c.py').match('a/*.py')
619 .. method:: PurePath.relative_to(other, walk_up=False)
651 This function is part of :class:`PurePath` and works with strings.
665 .. method:: PurePath.with_name(name)
682 .. method:: PurePath.with_stem(stem)
706 .. method:: PurePath.with_suffix(suffix)
723 .. method:: PurePath.with_segments(*pathsegments)
759 A subclass of :class:`PurePath`, this class represents concrete paths of
766 *pathsegments* is specified similarly to :class:`PurePath`.
776 *pathsegments* is specified similarly to :class:`PurePath`.
791 *pathsegments* is specified similarly to :class:`PurePath`.
877 :class:`PurePath` objects. However, its use of :func:`os.fsencode` makes
1653 :meth:`~PurePath.full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:
1711 4. Like all :class:`PurePath` and :class:`Path` objects, the values returned
1726 pathlib implements path operations using :class:`PurePath` and :class:`Path`
1766 :class:`PurePath`/:class:`Path` equivalent.
1771 :func:`os.path.dirname` :attr:`PurePath.parent`
1772 :func:`os.path.basename` :attr:`PurePath.name`
1773 :func:`os.path.splitext` :attr:`PurePath.stem`, :attr:`PurePath.suffix`
1774 :func:`os.path.join` :meth:`PurePath.joinpath`
1775 :func:`os.path.isabs` :meth:`PurePath.is_absolute`
1776 :func:`os.path.relpath` :meth:`PurePath.relative_to` [1]_
1807 absolute and remove "``..``" parts, whereas :meth:`PurePath.relative_to`