eSrSSKrSSKJrJr SSKJrJrJrJ r J r SSK J r J r JrJrJrJrJr S/rSrSrS r\\\\ 4r\\\4rS r\R4S 5r"S S\5r"S S5r"SS5r"SS\5r g)a Abstract base classes for rich path objects. This module is published as a PyPI package called "pathlib-abc". This module is also a *PRIVATE* part of the Python standard library, where it's developed alongside pathlib. If it finds success and maturity as a PyPI package, it could become a public part of the standard library. Two base classes are defined here -- PurePathBase and PathBase -- that resemble pathlib's PurePath and Path respectively. N)_Globber_no_recurse_symlinks)ENOENTENOTDIREBADFELOOPEINVAL)S_ISDIRS_ISLNKS_ISREGS_ISSOCKS_ISBLKS_ISCHRS_ISFIFOUnsupportedOperation{ic`[USS5[;=(d [USS5[;$)Nerrnowinerror)getattr_IGNORED_ERRNOS_IGNORED_WINERRORS) exceptions 2/opt/imh/python3.13/lib/python3.13/pathlib/_abc.py _ignore_errorr&s1 Iw - @ G Iz4 04F FHc*URS5S:H$)NAa)normcase)parsers r_is_case_sensitiver"+s ??4 D ((rc\rSrSrSrSrg)r0zVAn exception that is raised when an unsupported operation is called on a path object. N)__name__ __module__ __qualname____firstlineno____doc____static_attributes__r%rrrr0s  rcV\rSrSrSr\S5r\S5rSr Sr Sr Sr S r S rg ) ParserBase7abBase class for path parsers, which do low-level path manipulation. Path parsers provide a subset of the os.path API, specifically those functions needed to provide PurePathBase functionality. Each PurePathBase subclass references its path parser via a 'parser' class attribute. Every method in this base class raises an UnsupportedOperation exception. c&URSUS3$N.z is unsupportedr&cls attributes r_unsupported_msgParserBase._unsupported_msgA,,q ?;;rc6[URS55e)z/The character used to separate path components.seprr6selfs rr:ParserBase.sepEs#4#8#8#?@@rc6[URS55e)zJoin path segments.zjoin()r;r=pathpathss rjoinParserBase.joinJs"4#8#8#BCCrc6[URS55e)zSplit the path into a pair (head, tail), where *head* is everything before the final path separator, and *tail* is everything after. Either part may be empty. zsplit()r;r=rAs rsplitParserBase.splitNs #4#8#8#CDDrc6[URS55e)zSplit the path into a 2-item tuple (drive, tail), where *drive* is a device name or mount point, and *tail* is everything after the drive. Either part may be empty.z splitdrive()r;rFs r splitdriveParserBase.splitdriveU#4#8#8#HIIrc6[URS55e)zNormalize the case of the path.z normcase()r;rFs rr ParserBase.normcase[s"4#8#8#FGGrc6[URS55e)zXReturns whether the path is absolute, i.e. unaffected by the current directory or drive.zisabs()r;rFs risabsParserBase.isabs_s#4#8#8#CDDrr%N)r&r'r(r)r* classmethodr6propertyr:rCrGrJr rPr+r%rrr-r-7sO<<AADEJ HErr-c`\rSrSrSrSr\"5r\r Sr Sr Sr Sr \S5r\S 5r\S 5r\S 5r\S 5r\S 5r\S5rSrSrSrSS.SjrSr\S5rSrSrSr\S5r\S5r \S5r!Sr"\S5r#SS .S!jr$SS .S"jr%Sr&g)# PurePathBaseeaEBase class for pure path objects. This class *does not* provide several magic methods that are defined in its subclass PurePath. They are: __fspath__, __bytes__, __reduce__, __hash__, __eq__, __lt__, __le__, __gt__, __ge__. Its initializer and path joining methods accept only strings, not os.PathLike objects more broadly. ) _raw_path _resolvingcU(aURR"U/UQ76OUUl[UR[5(d,[ S[ UR5R<35eSUlg)Nzpath should be a str, not F) r!rCrW isinstancestr TypeErrortyper&rXr@s r__init__PurePathBase.__init__{sb;@))$77d$..#..,T$..-A-J-J,MNP Prc[U5"U6$)zConstruct a new path object from any number of path-like objects. Subclasses may override this method to customize how new path objects are created from methods like `iterdir()`. )r]r= pathsegmentss r with_segmentsPurePathBase.with_segmentss Dz<((rcUR$)zSReturn the string representation of the path, suitable for passing to system calls.)rWr<s r__str__PurePathBase.__str__s~~rc`[U5RURRS5$)zFReturn the string representation of the path with forward (/) slashes./)r[replacer!r:r<s ras_posixPurePathBase.as_posixs#4y  #66rcRURRUR5S$)z.The drive prefix (letter or UNC path), if any.rr!rJanchorr<s rdrivePurePathBase.drive"{{%%dkk2155rcRURRUR5S$)zThe root of the path, if any.rnr<s rrootPurePathBase.rootrrrc URS$)z/The concatenation of the drive and root, or ''.r)_stackr<s rroPurePathBase.anchors{{1~rcRURRUR5S$)z!The final path component, if any.rt)r!rGrWr<s rnamePurePathBase.names"{{  033rc~URnURS5nSUs=:a[U5S- :aO gXS$g)zc The final component's last suffix, if any. This includes the leading period. For example: '.txt' r1rrtNr{rfindlenr=r{is rsuffixPurePathBase.suffixsByy JJsO q 3t9q= 8OrcURnURS5(a/$URS5nURS5SSVs/sHnSU-PM sn$s snf)zt A list of the final component's suffixes, if any. These include the leading periods. For example: ['.tar', '.gz'] r1rtN)r{endswithlstriprG)r=r{rs rsuffixesPurePathBase.suffixess\yy ==  I{{3+/::c?12+>?+>f +>???s AcURnURS5nSUs=:a[U5S- :a O U$USU$U$)z0The final path component, minus its last suffix.r1rrtNrrs rstemPurePathBase.stemsHyy JJsO q 3t9q= K8OKrcURRnU"U5S(a[SU<35eURU"UR5SU5$)z-Return a new path with the file name changed.rz Invalid name )r!rG ValueErrorrcrW)r=r{rGs r with_namePurePathBase.with_namesO !! ;q>}TH56 6!!%"7":DAArcURnU(dURU5$U(d[U<S35eURX-5$)z(Return a new path with the stem changed.z has a non-empty suffix)rrr)r=rrs r with_stemPurePathBase.with_stemsD>>$' 'x'>?@ @>>$-0 0rcURnU(d[U<S35eU(a4URS5(a[U5S:d[SU<35eUR X!-5$)zReturn a new path with the file suffix changed. If the path has no suffix, add given suffix. If the given suffix is an empty string, remove the suffix from the path. z has an empty namer1rtzInvalid suffix )rr startswithrr)r=rrs r with_suffixPurePathBase.with_suffixsc yyx'9:; ; V..s33F avj9: :>>$-0 0rF)walk_upc[U[5(dURU5nURup4URupVX5:wa'[ UR <SUR <S35eU(aOU(aHUSUS:Xa<UR 5 UR 5 U(aU(aUSUS:XaM<UHpnU(aUS:XaMU(d&[ UR <SUR <35eUS:Xa[ SUR <S35eURS5 Mr UR"S /[U5Q76$) aReturn the relative path to another path identified by the passed arguments. If the operation is not possible (because this is not related to the other path), raise ValueError. The *walk_up* parameter controls whether `..` may be used to resolve the path. z and z have different anchorsr1z is not in the subpath of ..z'..' segment in z cannot be walkedr~) rZrUrcrxrrWpopappendreversed)r=otherranchor0parts0anchor1parts1parts r relative_toPurePathBase.relative_tos&%..&&u-E++,,  1u6II`ab bF2J&*$< JJL JJLF2J&*$<D43; DNN#55OPUP_P_Ob!cdd #3EOO3FFW!XYY d#!!"8x'788rct[U[5(dURU5nURup#URupEX$:wagU(aOU(aHUSUS:Xa<UR 5 UR 5 U(aU(aUSUS:XaM<UHnU(dM US:wdM g g)zFReturn True if the path is relative to another path or False. Frr1T)rZrUrcrxr)r=rrrrrrs ris_relative_toPurePathBase.is_relative_tos%..&&u-E++,,  F2J&*$< JJL JJLF2J&*$<Dt rcvURupU(aURU5 [[U55$)zRAn object providing sequence-like access to the components in the filesystem path.)rxrtupler)r=ropartss rrPurePathBase.partss-   LL Xe_%%rc<UR"UR/UQ76$)zCombine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored). )rcrWras rjoinpathPurePathBase.joinpath"s !!$..@<@@rchURURU5$![a [s$f=fNrcrWr\NotImplementedr=keys r __truediv__PurePathBase.__truediv__*s3 "%%dnnc: : "! ! "s 11cfURXR5$![a [s$f=frrrs r __rtruediv__PurePathBase.__rtruediv__0s1 "%%c>>: : "! ! "s 00cURRnURnU"U5up4/nX#:wa$URU5 UnU"U5up4X#:waM$X%4$)z Split the path into a 2-tuple (anchor, parts), where *anchor* is the uppermost parent of the path (equivalent to path.parents[-1]), and *parts* is a reversed list of parts following the anchor. )r!rGrWr)r=rGrAparentr{namess rrxPurePathBase._stack6s^ !!~~T{ n LL D ;LFn{rcURnURRU5SnX:wa$URU5nURUlU$U$)zThe logical parent of the path.r)rWr!rGrcrX)r=rArs rrPurePathBase.parentGsQ~~""4(+ >''/F $F M rcURRnURnU"U5Sn/nX#:wa4URUR U55 UnU"U5SnX#:waM4[ U5$)z*A sequence of this path's logical parents.r)r!rGrWrrcr)r=rGrArparentss rrPurePathBase.parentsRso !!~~tQn NN4--f5 6D4[^FnW~rcLURRUR5$)zKTrue if the path is absolute (has both a root and, if applicable, a drive).)r!rPrWr<s r is_absolutePurePathBase.is_absolute_s{{  00rc[U5$)z Open the file in text mode, write to it, and close the file. zdata must be str, not %swr3N)rZr[r\ __class__r&r'r9)r=r:r$r%r&r.s r write_textPathBase.write_texts`$$$6 NN3345 5 YYC(7Y SWX774=T S Ss A$$ A2c6[URS55e)zYield path objects of the directory contents. The children are yielded in arbitrary order, and the special entries '.' and '..' are not included. z iterdir()r;r<s riterdirPathBase.iterdirs #4#8#8#EFFrcUc[UR5nSnOSnU(aSO[nURURRX$U5nUR U5$)NFT)r"r!rrr:selector)r=rrrecurse_symlinks case_pedanticrrs r_glob_selectorPathBase._glob_selectorsX  !/  '<00((1G.yyRbyccrFc## U/nU(Ga UR5n[U[5(aUv M3/n/nU(dURXVU45 UR 5HhnUR US9(a5U(dURU5 URUR 5 MMURUR 5 Mj U(a3XVU4v U[U5V s/sHoRU 5PM sn - nU(aGM gg![a URUR 5 Mf=f![agn UbU"U 5 U(dI[UR5[5(d&[UR5[5(dM&Sn A GMSn A ff=fs sn f7f)zBWalk the directory tree from this directory, similar to os.walk().rN) rrZrrrDrr{rrr) r=top_downon_errorrrBrAdirnames filenameschilderrords rwalk PathBase.walksY99;D$&& HI di89 !\\^E5 <<<H#+ % U 3$OOEJJ7%,,UZZ8,"i//HX4FG4Fq--*4FGG;e$#5!((45 'UO(e<<)e<<  HstAF?E,AD3E5DEF?/F: F?F?%E?EEE F7AF2+F?2F77F?c6[URS55e)zReturn an absolute version of this path No normalization or symlink resolution is performed. Use resolve() to resolve symlinks and remove '..' segments. z absolute()r;r<s rabsolutePathBase.absolutes #4#8#8#FGGrc.U"S5R5$)zrs /77PPP " " "&7E51#% H  )) . +E+E\j4j4\ OF|OFr