• Home
  • Raw
  • Download

Lines Matching refs:PurePosixPath

102    it creates either a :class:`PurePosixPath` or a :class:`PureWindowsPath`)::
105 PurePosixPath('setup.py')
112 PurePosixPath('foo/some/path/bar')
114 PurePosixPath('foo/bar')
119 PurePosixPath('.')
125 PurePosixPath('/usr/lib64')
140 PurePosixPath('foo/bar')
142 PurePosixPath('foo/bar')
144 PurePosixPath('foo/../bar')
146 (a naïve approach would make ``PurePosixPath('foo/../bar')`` equivalent
147 to ``PurePosixPath('bar')``, which is wrong if ``foo`` is a symbolic link
156 .. class:: PurePosixPath(*pathsegments)
161 >>> PurePosixPath('/etc')
162 PurePosixPath('/etc')
187 >>> PurePosixPath('foo') == PurePosixPath('FOO')
198 >>> PureWindowsPath('foo') == PurePosixPath('foo')
200 >>> PureWindowsPath('foo') < PurePosixPath('foo')
203 TypeError: '<' not supported between instances of 'PureWindowsPath' and 'PurePosixPath'
213 PurePosixPath('/etc')
215 PurePosixPath('/etc/init.d/apache2')
218 PurePosixPath('/usr/bin')
276 from pathlib import PurePosixPath, PureWindowsPath
288 >>> PurePosixPath('/etc').drive
304 >>> PurePosixPath('/etc').root
320 >>> PurePosixPath('/etc').anchor
344 >>> p = PurePosixPath('/a/b/c/d')
346 PurePosixPath('/a/b/c')
350 >>> p = PurePosixPath('/')
352 PurePosixPath('/')
353 >>> p = PurePosixPath('.')
355 PurePosixPath('.')
360 >>> p = PurePosixPath('foo/..')
362 PurePosixPath('foo')
374 >>> PurePosixPath('my/library/setup.py').name
389 >>> PurePosixPath('my/library/setup.py').suffix
391 >>> PurePosixPath('my/library.tar.gz').suffix
393 >>> PurePosixPath('my/library').suffix
401 >>> PurePosixPath('my/library.tar.gar').suffixes
403 >>> PurePosixPath('my/library.tar.gz').suffixes
405 >>> PurePosixPath('my/library').suffixes
413 >>> PurePosixPath('my/library.tar.gz').stem
415 >>> PurePosixPath('my/library.tar').stem
417 >>> PurePosixPath('my/library').stem
437 >>> p = PurePosixPath('/etc/passwd')
450 >>> PurePosixPath('/a/b').is_absolute()
452 >>> PurePosixPath('a/b').is_absolute()
468 reserved under Windows, ``False`` otherwise. With :class:`PurePosixPath`,
473 >>> PurePosixPath('nul').is_reserved()
485 >>> PurePosixPath('/etc').joinpath('passwd')
486 PurePosixPath('/etc/passwd')
487 >>> PurePosixPath('/etc').joinpath(PurePosixPath('passwd'))
488 PurePosixPath('/etc/passwd')
489 >>> PurePosixPath('/etc').joinpath('init.d', 'apache2')
490 PurePosixPath('/etc/init.d/apache2')
529 >>> p = PurePosixPath('/etc/passwd')
531 PurePosixPath('etc/passwd')
533 PurePosixPath('passwd')
599 A subclass of :class:`Path` and :class:`PurePosixPath`, this class