Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
 lŽŒY™·ã@sPddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z mZmZddlmZddlmZmZmZmZmZmZmZddlmZdZejd krUddlZej ƒdd …d dfkrFdd lm!Z!n d ZdZ!ndZddddddgZ"dd„Z#Gdd„de$ƒZ%Gdd„de%ƒZ&Gdd„de%ƒZ'e&ƒZ(e'ƒZ)Gdd„dƒZ*Gdd„de*ƒZ+e+ƒZ,e d d!„ƒZ-d"d#„Z.e/ed$ƒrDej0ƒe.ƒZ.Gd%d&„d&ƒZ1Gd'd(„d(ƒZ2Gd)d*„d*e1ƒZ3Gd+d,„d,e1ƒZ4Gd-d.„d.e1ƒZ5Gd/d0„d0e ƒZ6Gd1d„de$ƒZ7Gd2d„de7ƒZ8Gd3d„de7ƒZ9Gd4d„de7ƒZ:Gd5d„de:e8ƒZ;Gd6d„de:e9ƒZ<dS)7éN)ÚSequence)Úcontextmanager)ÚEINVALÚENOENTÚENOTDIR)Ú attrgetter)ÚS_ISDIRÚS_ISLNKÚS_ISREGÚS_ISSOCKÚS_ISBLKÚS_ISCHRÚS_ISFIFO)Úquote_from_bytesTÚntéé)Ú_getfinalpathnameFÚPurePathÚ PurePosixPathÚPureWindowsPathÚPathÚ PosixPathÚ WindowsPathcCs"d|kp!d|kp!d|kS)NÚ*ú?ú[©)Úpatrrú&/opt/python35/lib/python3.5/pathlib.pyÚ_is_wildcard_pattern&sr c@s:eZdZdZdd„Zdd„Zdd„ZdS) Ú_FlavourzPA flavour implements a particular (platform-specific) set of path semantics.cCs|jj|_dS)N)ÚsepÚjoin)ÚselfrrrÚ__init__0sz_Flavour.__init__c CsŠg}|j}|j}d}}t|ƒ}x%|D]}|sDq5|r\|j||ƒ}|j|ƒ\}}} || krËxpt| j|ƒƒD].} | r–| dkr–|jtj| ƒƒq–Wn(| ró| dkró|jtj| ƒƒ|sÿ|r5|sQxI|D]A}|sq |r3|j||ƒ}|j|ƒd}|r Pq WPq5W|sb|rs|j||ƒ|j ƒ|||fS)NÚÚ.r) r"ÚaltsepÚreversedÚreplaceÚ splitrootÚsplitÚappendÚsysÚinternÚreverse) r$ÚpartsZparsedr"r(ÚdrvÚrootÚitÚpartZrelÚxrrrÚ parse_parts3s@          z_Flavour.parse_partscCs¤|r8| r—|r—||||g|dd…fSn_|r†||ksh|j|ƒ|j|ƒkr—||||dd…fSn||||fS|||fS)z‘ Join the two paths represented by the respective (drive, root, parts) tuples. Return a new (drive, root, parts) tuple. éN)Úcasefold)r$r2r3r1Zdrv2Zroot2Zparts2rrrÚjoin_parsed_partsYs %*z_Flavour.join_parsed_partsN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r%r7r:rrrrr!,s   &r!c@sWeZdZdZdZdZeZej dkZ e dd„e e dƒe dƒd ƒDƒƒe d d„e e d ƒe d ƒd ƒDƒƒBZd Zddddhdd„e d dƒDƒBdd„e d dƒDƒBZedd„Zdd„Zdd„Zdd„Zedd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd(S))Ú_WindowsFlavourú\ú/Trccs|]}t|ƒVqdS)N)Úchr)Ú.0r6rrrú wsz_WindowsFlavour.ÚaÚzr8ccs|]}t|ƒVqdS)N)rB)rCr6rrrrDxsÚAÚZz\\?\ZCONZPRNZAUXZNULcCsh|]}d|’qS)zCOM%dr)rCÚirrrú ~s z_WindowsFlavour.é cCsh|]}d|’qS)zLPT%dr)rCrIrrrrJs c Cs×|dd…}|dd…}||krp||krp|j|ƒ\}}|dd…}|dd…}nd}|dd…}||krZ||krZ||krZ|j|dƒ}|dkrZ|j||dƒ}||dkrZ|dkrt|ƒ}|r5||d|…|||dd…fS|d|…|||dd…fSd} } |dkr¥||jkr¥|dd…} |dd…}|}||krÆ|} |j|ƒ}|| | |fS) Nrr8rr&éú:éÿÿÿÿrN)Ú_split_extended_pathÚfindÚlenÚ drive_lettersÚlstrip) r$r5r"ÚfirstÚsecondÚprefixZthirdÚindexZindex2r2r3rrrr+ˆs6$   )%  z_WindowsFlavour.splitrootcCs |jƒS)N)Úlower)r$Úsrrrr9¯sz_WindowsFlavour.casefoldcCsdd„|DƒS)NcSsg|]}|jƒ‘qSr)rX)rCÚprrrú ³s z2_WindowsFlavour.casefold_parts..r)r$r1rrrÚcasefold_parts²sz_WindowsFlavour.casefold_partscCs?t|ƒ}|stjƒStdk r;|jt|ƒƒSdS)N)ÚstrÚosÚgetcwdrÚ_ext_to_normal)r$ÚpathrYrrrÚresolveµs    z_WindowsFlavour.resolvecCsvd}|j|ƒrl|dd…}|dd…}|jdƒrl||dd…7}d|dd…}||fS)Nr&ézUNC\rLr@)Ú startswith)r$rYZ ext_prefixrVrrrrO¾sz$_WindowsFlavour._split_extended_pathcCs|j|ƒdS)Nr8)rO)r$rYrrrr`Èsz_WindowsFlavour._ext_to_normalcCsE|s dS|djdƒr!dS|djdƒdjƒ|jkS)NFrz\\r8r'rN)rdÚ partitionÚupperÚreserved_names)r$r1rrrÚ is_reservedÌs z_WindowsFlavour.is_reservedcCsˆ|j}t|ƒdkrg|ddkrg|jƒdd…jdƒ}d|t|jdƒƒfSdt|jƒjdƒƒSdS)Nrr8rMrAz file:///%s/%szutf-8zfile:)ÚdriverQÚas_posixrSÚurlquote_from_bytesÚencode)r$rariÚrestrrrÚmake_uriØs  "z_WindowsFlavour.make_uric CsAdtjkrtjd}nzdtjkr>tjd}n[dtjkr�ytjd}Wntk rxd}YnX|tjd}n tdƒ‚|r=tjd|kr=|j|fƒ\}}}|d tjdkrôtd |ƒ‚||d <|s |r.|||j|dd…ƒ}n|j|ƒ}|S) NÚHOMEZ USERPROFILEZHOMEPATHZ HOMEDRIVEr&zCan't determine home directoryZUSERNAMEr8z%Can't determine home directory for %rrNrN)r^ÚenvironÚKeyErrorÚ RuntimeErrorr7r#)r$ÚusernameÚuserhomer2r3r1rrrÚ gethomediräs,      $z_WindowsFlavour.gethomedirN)r;r<r=r"r(Úhas_drvÚntpathÚpathmodr^ÚnameÚ is_supportedÚsetÚrangeÚordrRZext_namespace_prefixrgr+r9r\rbrOr`rhrnrurrrrr?ks& /3) '     r?c@sŽeZdZdZdZdZeZej dkZ edd„Z dd„Z d d „Z d d „Zd d„Zdd„Zdd„ZdS)Ú _PosixFlavourrAr&FrcCss|rb|d|krb|j|ƒ}t|ƒt|ƒdkrRd|d|fSd||fSn dd|fSdS)Nrrr&)rSrQ)r$r5r"Z stripped_partrrrr+ s z_PosixFlavour.splitrootcCs|S)Nr)r$rYrrrr9sz_PosixFlavour.casefoldcCs|S)Nr)r$r1rrrr\sz_PosixFlavour.casefold_partscsj|j‰|j‰i‰‡‡‡‡fdd†‰|jƒrEdn tjƒ}ˆ|t|ƒƒpiˆS)Ncs)|jˆƒrd}x |jˆƒD]ü}| s%|dkrAq%|dkrh|jˆƒ\}}}q%|ˆ|}|ˆkr«ˆ|}|dk r›q%td|ƒ‚yˆj|ƒ}Wn=tk rý}z|jtkrå‚|}WYdd}~Xq%Xdˆ|<ˆ||ƒ}|ˆ|._resolver&)r"Ú _accessorÚ is_absoluter^r_r])r$raÚbaser)r‡rˆr‰r"rrb s   %z_PosixFlavour.resolvecCsdS)NFr)r$r1rrrrhLsz_PosixFlavour.is_reservedcCst|ƒ}dt|ƒS)Nzfile://)Úbytesrk)r$raZbpathrrrrnOs z_PosixFlavour.make_uric Cs˜|sOytjdSWq”tk rKddl}|jtjƒƒjSYq”XnEddl}y|j|ƒjSWn"tk r“td|ƒ‚YnXdS)Nrorz%Can't determine home directory for %r) r^rprqÚpwdÚgetpwuidÚgetuidÚpw_dirÚgetpwnamrr)r$rsrŽrrrruUs    z_PosixFlavour.gethomedirN)r;r<r=r"r(rvÚ posixpathrxr^ryrzr+r9r\rbrhrnrurrrrr~s    ,  r~c@seZdZdZdS)Ú _AccessorzjAn accessor implements a particular (system-specific or not) way of accessing paths on the filesystem.N)r;r<r=r>rrrrr”is r”c@sEeZdZdd„Zdd„ZeejƒZeejƒZeejƒZeej ƒZ eej ƒZ e edƒr�eej ƒZ n dd„Z eej ƒZ eejƒZeejƒZeejƒZeejƒZerereejƒZq&dd „Zned d „ƒZeejƒZd d „Zd S)Ú_NormalAccessorcs+tjˆƒ‡fdd†ƒ}t|ƒS)Ncsˆt|ƒ|ŒS)N)r])ÚpathobjÚargs)ÚstrfuncrrÚwrappedqsz._NormalAccessor._wrap_strfunc..wrapped)Ú functoolsÚwrapsÚ staticmethod)r˜r™r)r˜rÚ _wrap_strfuncps!z_NormalAccessor._wrap_strfunccs+tjˆƒ‡fdd†ƒ}t|ƒS)Ncsˆt|ƒt|ƒ|ŒS)N)r])ZpathobjAZpathobjBr—)r˜rrr™wsz5_NormalAccessor._wrap_binary_strfunc..wrapped)ršr›rœ)r˜r™r)r˜rÚ_wrap_binary_strfuncvs!z$_NormalAccessor._wrap_binary_strfuncÚlchmodcCstdƒ‚dS)Nz%lchmod() not available on this system)ÚNotImplementedError)r$r–ÚmoderrrrŸ‰sz_NormalAccessor.lchmodcCstdƒ‚dS)Nz&symlink() not available on this system)r )rEÚbÚtarget_is_directoryrrrÚsymlinkšsz_NormalAccessor.symlinkcCstjt|ƒt|ƒƒS)N)r^r¤r])rEr¢r£rrrr¤žscCs tj|ƒS)N)r^r€)r$rarrrr€¥sz_NormalAccessor.readlinkN)r;r<r=r�ržr^ÚstatÚlstatÚopenÚlistdirÚchmodÚhasattrrŸÚmkdirÚunlinkÚrmdirÚrenamer*rÚsupports_symlinksr¤rœÚutimer€rrrrr•ns,    r•c#sdyˆjˆVWnMtk r_i‰‡‡fdd†}d|_z |VWdˆjƒXYnXdS)Nc s=y ˆ|SWn*tk r8ˆ|Œ}ˆ|<|SYnXdS)N)rq)r—Úvalue)ÚcacheÚfuncrrÚwrapper·s   z_cached..wrapperT)Ú __cached__ÚAttributeErrorÚclear)r³r´r)r²r³rÚ_cached°s    r¸cCsr|d}|dd…}|dkr/t}n6d|krJtdƒ‚nt|ƒr_t}nt}|||ƒS)Nrr8z**z:Invalid pattern: '**' can only be an entire path component)Ú_RecursiveWildcardSelectorÚ ValueErrorr Ú_WildcardSelectorÚ_PreciseSelector)Ú pattern_partsrÚ child_partsÚclsrrrÚ_make_selectorÃs      rÀÚ lru_cachec@s.eZdZdZdd„Zdd„ZdS)Ú _SelectorzYA selector matches a specific glob pattern part against the children of a given path.cCs1||_|r!t|ƒ|_n tƒ|_dS)N)r¾rÀÚ successorÚ_TerminatingSelector)r$r¾rrrr%Øs z_Selector.__init__cCs@t|ƒ}|j}|j}|jj}|j||||ƒS)zuIterate over all child paths of `parent_path` matched by this selector. This can contain parent_path itself.)ÚtypeÚis_dirÚexistsrŠr¨Ú _select_from)r$Ú parent_pathZpath_clsrÆrÇr¨rrrÚ select_fromßs     z_Selector.select_fromN)r;r<r=r>r%rÊrrrrrÂÔs  rÂc@seZdZdd„ZdS)rÄccs |VdS)Nr)r$rÉrÆrÇr¨rrrrÈësz!_TerminatingSelector._select_fromN)r;r<r=rÈrrrrrÄés rÄc@s(eZdZdd„Zdd„ZdS)r¼cCs||_tj||ƒdS)N)ryrÂr%)r$ryr¾rrrr%ñs z_PreciseSelector.__init__c cszy]||ƒsdS|j|jƒ}||ƒr\x(|jj||||ƒD] }|VqMWWntk rudSYnXdS)N)Ú_make_child_relpathryrÃrÈÚPermissionError)r$rÉrÆrÇr¨rarZrrrrÈõs  "  z_PreciseSelector._select_fromN)r;r<r=r%rÈrrrrr¼ïs  r¼c@s(eZdZdd„Zdd„ZdS)r»cCs/tjtj|ƒƒ|_tj||ƒdS)N)ÚreÚcompileÚfnmatchÚ translaterrÂr%)r$rr¾rrrr%sz_WildcardSelector.__init__c cs¬y�||ƒsdS|jj}xl||ƒD]^}||ƒ}|jj|ƒr,|j|ƒ}x(|jj||||ƒD] } | Vq{Wq,WWntk r§dSYnXdS)N)Ú_flavourr9rÚmatchrËrÃrÈrÌ) r$rÉrÆrÇr¨ÚcfryZ casefoldedrarZrrrrÈs   " z_WildcardSelector._select_fromN)r;r<r=r%rÈrrrrr»s  r»c@s4eZdZdd„Zdd„Zdd„ZdS)r¹cCstj||ƒdS)N)rÂr%)r$rr¾rrrr%sz#_RecursiveWildcardSelector.__init__c csŠ|Vyhxa||ƒD]S}|j|ƒ}||ƒr|jƒ rx"|j|||ƒD] }|VqYWqWWntk r…dSYnXdS)N)rËÚ is_symlinkÚ_iterate_directoriesrÌ)r$rÉrÆr¨ryrarZrrrrÕs z/_RecursiveWildcardSelector._iterate_directoriesc csÌy¯||ƒsdSt|ƒ�Œ}tƒ}zn|jj}x[|j|||ƒD]D}x;|||||ƒD]$}||krl|V|j|ƒqlWqPWWd|jƒXWdQRXWntk rÇdSYnXdS)N)r¸r{rÃrÈrÕÚaddr·rÌ) r$rÉrÆrÇr¨ZyieldedZsuccessor_selectZstarting_pointrZrrrrÈ's     z'_RecursiveWildcardSelector._select_fromN)r;r<r=r%rÕrÈrrrrr¹s   r¹c@sLeZdZdZdZdd„Zdd „Zd d „Zd d „ZdS)Ú _PathParentszvThis object provides sequence-like access to the logical ancestors of a path. Don't try to construct it yourself.Ú_pathclsÚ_drvÚ_rootÚ_partscCs7t|ƒ|_|j|_|j|_|j|_dS)N)rÅrØrÙrÚrÛ)r$rarrrr%Cs  z_PathParents.__init__cCs4|js|jr#t|jƒdSt|jƒSdS)Nr8)rÙrÚrQrÛ)r$rrrÚ__len__Jsz_PathParents.__len__cCsX|dks|t|ƒkr*t|ƒ‚|jj|j|j|jd| d…ƒS)Nrr8)rQÚ IndexErrorrØÚ_from_parsed_partsrÙrÚrÛ)r$ÚidxrrrÚ __getitem__Ps z_PathParents.__getitem__cCsdj|jjƒS)Nz <{}.parents>)ÚformatrØr;)r$rrrÚ__repr__Vsz_PathParents.__repr__N)rØrÙrÚrÛ) r;r<r=r>Ú __slots__r%rÜràrârrrrr×>s    r×c@s\eZdZdZdXZd d „Zd d „Zed d„ƒZeddd„ƒZ eddd„ƒZ edd„ƒZ dd„Z dd„Z dd„Zdd„Zdd„Zd d!„Zd"d#„Zed$d%„ƒZd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zeedƒd2d3ƒZeedƒd2d4ƒZed5d6„ƒZed7d8„ƒZed9d:„ƒZ ed;d<„ƒZ!ed=d>„ƒZ"d?d@„Z#dAdB„Z$dCdD„Z%edEdF„ƒZ&dGdH„Z'dIdJ„Z(dKdL„Z)edMdN„ƒZ*edOdP„ƒZ+dQdR„Z,dSdT„Z-dUdV„Z.dWS)YraHPurePath represents a filesystem path and offers operations which don't imply any actual filesystem I/O. Depending on your system, instantiating a PurePath will return either a PurePosixPath or a PureWindowsPath object. You can also instantiate either of these classes directly, regardless of your system. rÙrÚrÛÚ_strÚ_hashÚ_ppartsÚ_cached_cpartscGs4|tkr'tjdkr!tnt}|j|ƒS)z÷Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object. r)rr^ryrrÚ _from_parts)r¿r—rrrÚ__new__fs zPurePath.__new__cCs|jt|jƒfS)N)Ú __class__ÚtuplerÛ)r$rrrÚ __reduce__pszPurePath.__reduce__cCs�g}xh|D]`}t|tƒr2||j7}q t|tƒrW|jt|ƒƒq tdt|ƒƒ‚q W|jj|ƒS)Nz/argument should be a path or str object, not %r) Ú isinstancerrÛr]r-Ú TypeErrorrÅrÑr7)r¿r—r1rErrrÚ _parse_argsus zPurePath._parse_argsTcCsVtj|ƒ}|j|ƒ\}}}||_||_||_|rR|jƒ|S)N)ÚobjectrérïrÙrÚrÛÚ_init)r¿r—Úinitr$r2r3r1rrrrè†s    zPurePath._from_partscCs>tj|ƒ}||_||_||_|r:|jƒ|S)N)rðrérÙrÚrÛrñ)r¿r2r3r1ròr$rrrrÞ“s    zPurePath._from_parsed_partscCsB|s |r.|||jj|dd…ƒS|jj|ƒSdS)Nr8)rÑr#)r¿r2r3r1rrrÚ_format_parsed_parts�s "zPurePath._format_parsed_partscCsdS)Nr)r$rrrrñ¤szPurePath._initcCs^|j|ƒ\}}}|jj|j|j|j|||ƒ\}}}|j|||ƒS)N)rïrÑr:rÙrÚrÛrÞ)r$r—r2r3r1rrrÚ _make_child¨s *zPurePath._make_childc CsRy |jSWn@tk rM|j|j|j|jƒp<d|_|jSYnXdS)z[Return the string representation of the path, suitable for passing to system calls.r'N)rär¶rórÙrÚrÛ)r$rrrÚ__str__®s   zPurePath.__str__cCs"|j}t|ƒj|jdƒS)zNReturn the string representation of the path with forward (/) slashes.rA)rÑr]r*r")r$Úfrrrrj¸s zPurePath.as_posixcCstjt|ƒƒS)zaReturn the bytes representation of the path. This is only recommended to use under Unix.)r^Úfsencoder])r$rrrÚ __bytes__¾szPurePath.__bytes__cCsdj|jj|jƒƒS)Nz{}({!r}))rárêr;rj)r$rrrrâÃszPurePath.__repr__cCs(|jƒstdƒ‚|jj|ƒS)z Return the path as a 'file' URI.z.relative path can't be expressed as a file URI)r‹rºrÑrn)r$rrrÚas_uriÆs  zPurePath.as_uric CsCy |jSWn1tk r>|jj|jƒ|_|jSYnXdS)N)rçr¶rÑr\rÛ)r$rrrÚ_cpartsÌs   zPurePath._cpartscCs5t|tƒstS|j|jko4|j|jkS)N)rírÚNotImplementedrúrÑ)r$ÚotherrrrÚ__eq__ÕszPurePath.__eq__c CsCy |jSWn1tk r>tt|jƒƒ|_|jSYnXdS)N)rår¶Úhashrërú)r$rrrÚ__hash__Ús   zPurePath.__hash__cCs6t|tƒ s"|j|jk r&tS|j|jkS)N)rírrÑrûrú)r$rürrrÚ__lt__ás"zPurePath.__lt__cCs6t|tƒ s"|j|jk r&tS|j|jkS)N)rírrÑrûrú)r$rürrrÚ__le__æs"zPurePath.__le__cCs6t|tƒ s"|j|jk r&tS|j|jkS)N)rírrÑrûrú)r$rürrrÚ__gt__ës"zPurePath.__gt__cCs6t|tƒ s"|j|jk r&tS|j|jkS)N)rírrÑrûrú)r$rürrrÚ__ge__ðs"zPurePath.__ge__Údocz.The drive prefix (letter or UNC path), if any.zThe root of the path, if any.cCs|j|j}|S)z/The concatenation of the drive and root, or ''.)rÙrÚ)r$ÚanchorrrrrûszPurePath.anchorcCs?|j}t|ƒ|js$|jr*dndkr7dS|dS)z!The final path component, if any.r8rr&rN)rÛrQrÙrÚ)r$r1rrrrys *z PurePath.namecCsT|j}|jdƒ}d|ko9t|ƒdknrL||d…SdSdS)z*The final component's last suffix, if any.r'rr8Nr&)ryÚrfindrQ)r$ryrIrrrÚsuffix s  &zPurePath.suffixcCsO|j}|jdƒrgS|jdƒ}dd„|jdƒdd…DƒS)z1A list of the final component's suffixes, if any.r'cSsg|]}d|‘qS)r'r)rCrrrrr[s z%PurePath.suffixes..r8N)ryÚendswithrSr,)r$ryrrrÚsuffixess  zPurePath.suffixescCsT|j}|jdƒ}d|ko9t|ƒdknrL|d|…S|SdS)z0The final path component, minus its last suffix.r'rr8N)ryrrQ)r$ryrIrrrÚstems  &z PurePath.stemcCs¾|jstd|fƒ‚|jj|fƒ\}}}| s�|d|jj|jjgks�|s�|s�t|ƒdkr‘td|ƒ‚|j|j|j |j dd…|gƒS)z-Return a new path with the file name changed.z%r has an empty namer8zInvalid name %rNrNrN) ryrºrÑr7r"r(rQrÞrÙrÚrÛ)r$ryr2r3r1rrrÚ with_name&s )zPurePath.with_namecCsø|j}|j|ks0|jr@|j|kr@td|ƒ‚|rV|jdƒ sb|dkrrtd|ƒ‚|j}|s”td|fƒ‚|j}|s°||}n|dt|ƒ …|}|j|j |j |j dd…|gƒS)zCReturn a new path with the file suffix changed (or added, if none).zInvalid suffix %rr'z%r has an empty nameNr8rN) rÑr"r(rºrdryrrQrÞrÙrÚrÛ)r$rröryZ old_suffixrrrÚ with_suffix1s '"   zPurePath.with_suffixc GsQ|stdƒ‚|j}|j}|j}|rP||g|dd…}n|}|j|ƒ\}}}|r‘||g|dd…} n|} t| ƒ} |jj} | dkrÇ|pæ|n| |d| …ƒ| | ƒkr"|j|||ƒ} t dj t |ƒt | ƒƒƒ‚|j d| dkr=|nd|| d…ƒS)zÌReturn the relative path to another path identified by the passed arguments. If the operation is not possible (because this is not a subpath of the other path), raise ValueError. zneed at least one argumentr8Nrz{!r} does not start with {!r}r&) rîrÛrÙrÚrïrQrÑr\rórºrár]rÞ) r$rür1r2r3Z abs_partsZto_drvZto_rootZto_partsZ to_abs_partsÚnrÓÚ formattedrrrÚ relative_toDs(       : zPurePath.relative_toc Cs=y |jSWn+tk r8t|jƒ|_|jSYnXdS)zZAn object providing sequence-like access to the components in the filesystem path.N)rær¶rërÛ)r$rrrr1ds   zPurePath.partscGs |j|ƒS)zîCombine 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). )rô)r$r—rrrÚjoinpathpszPurePath.joinpathcCs|j|fƒS)N)rô)r$ÚkeyrrrÚ __truediv__xszPurePath.__truediv__cCs|j|g|jƒS)N)rèrÛ)r$rrrrÚ __rtruediv__{szPurePath.__rtruediv__cCsZ|j}|j}|j}t|ƒdkr=|s9|r=|S|j|||dd…ƒS)zThe logical parent of the path.r8NrN)rÙrÚrÛrQrÞ)r$r2r3r1rrrÚparent~s    zPurePath.parentcCs t|ƒS)z*A sequence of this path's logical parents.)r×)r$rrrÚparentsˆszPurePath.parentscCs'|js dS|jj p&t|jƒS)zSTrue if the path is absolute (has both a root and, if applicable, a drive).F)rÚrÑrvÚboolrÙ)r$rrrr‹�s zPurePath.is_absolutecCs|jj|jƒS)zaReturn True if the path contains one of the special names reserved by the system, if any.)rÑrhrÛ)r$rrrrh”szPurePath.is_reservedc Cs,|jj}||ƒ}|jj|fƒ\}}}|sHtdƒ‚|rg|||jƒkrgdS|r†|||jƒkr†dS|j}|s›|rÊt|ƒt|ƒkr·dS|dd…}nt|ƒt|ƒkrædSx?tt |ƒt |ƒƒD]"\}}t j ||ƒsdSqWdS)zE Return True if this path matches the given pattern. z empty patternFr8NT) rÑr9r7rºrÙrÚrúrQÚzipr)rÏÚ fnmatchcase) r$Z path_patternrÓr2r3Z pat_partsr1r5rrrrrÒ™s(     (zPurePath.matchN)rÙrÚrÛrärårærç)/r;r<r=r>rãrérìÚ classmethodrïrèrÞrórñrôrõrjrørârùÚpropertyrúrýrÿrrrrrrir3rryrr r r r rr1rrrrrr‹rhrÒrrrrrZs\                            c@seZdZeZfZdS)rN)r;r<r=Ú_posix_flavourrÑrãrrrrr³s c@seZdZeZfZdS)rN)r;r<r=Ú_windows_flavourrÑrãrrrrr¸s c@s\eZdZd`Zdd„Zddd„Zdd „Zd d „Zd d „Zdd„Z ddd„Z ddd„Z e dd„ƒZ e dd„ƒZdd„Zdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,dadddd.d/„Zd0d1„Zddd2d3„Zd4d5„Zddd6d7„Zdd8d9d:„Zdd;d;d<d=„Zd>d?„Zd@dA„Z dBdC„Z!dDdE„Z"dFdG„Z#dHdI„Z$dJdK„Z%d;dLdM„Z&dNdO„Z'dPdQ„Z(dRdS„Z)dTdU„Z*dVdW„Z+dXdY„Z,dZd[„Z-d\d]„Z.d^d_„Z/dS)brrŠÚ_closedcOsl|tkr'tjdkr!tnt}|j|ddƒ}|jjs^td|j fƒ‚|j ƒ|S)NrròFz$cannot instantiate %r on your system) rr^ryrrrèrÑrzr r;rñ)r¿r—Úkwargsr$rrrréÆs   z Path.__new__NcCs1d|_|dk r$|j|_n t|_dS)NF)rrŠÚ_normal_accessor)r$ÚtemplaterrrrñÐs  z Path._initcCs)|j|g}|j|j|j|ƒS)N)rÛrÞrÙrÚ)r$r5r1rrrrËÚszPath._make_child_relpathcCs|jr|jƒ|S)N)rÚ _raise_closed)r$rrrÚ __enter__às  zPath.__enter__cCs d|_dS)NT)r)r$ÚtÚvÚtbrrrÚ__exit__åsz Path.__exit__cCstdƒ‚dS)NzI/O operation on closed path)rº)r$rrrr!èszPath._raise_closedi¶cCs|jj|||ƒS)N)rŠr§)r$ryÚflagsr¡rrrÚ_openerësz Path._openeriÿcCs)|jr|jƒ|jj|||ƒS)zm Open the file pointed by this path and return a file descriptor, as os.open() does. )rr!rŠr§)r$r'r¡rrrÚ _raw_openïs  zPath._raw_opencCs|tjƒƒS)zjReturn a new path pointing to the current working directory (as returned by os.getcwd()). )r^r_)r¿rrrÚcwdúszPath.cwdcCs||ƒjjdƒƒS)zrReturn a new path pointing to the user's home directory (as returned by os.path.expanduser('~')). N)rÑru)r¿rrrÚhomesz Path.homec CsS|jƒ}y|jƒ}Wn!tk r?tj|ƒ}YnXtjj||ƒS)zoReturn whether other_path is the same or not as this file (as returned by os.path.samefile()). )r¥r¶r^raÚsamestat)r$Z other_pathÚstZother_strrrÚsamefiles   z Path.samefileccsd|jr|jƒxJ|jj|ƒD]6}|dkr;q&|j|ƒV|jr&|jƒq&WdS)zyIterate over the files in this directory. Does not yield any result for the special paths '.' and '..'. r'ú..N>r'r/)rr!rŠr¨rË)r$ryrrrÚiterdirs    z Path.iterdirccs˜|stdj|ƒƒ‚|jj|ƒ}|jj|fƒ\}}}|sW|rctdƒ‚tt|ƒƒ}x|j|ƒD] }|Vq…WdS)zˆIterate over this subtree and yield all existing files (of any kind, including directories) matching the given pattern. zUnacceptable pattern: {!r}z%Non-relative patterns are unsupportedN) rºrárÑr9r7r rÀrërÊ)r$Úpatternr2r3r½ÚselectorrZrrrÚglob!s  z Path.globccs�|jj|ƒ}|jj|fƒ\}}}|s<|rHtdƒ‚tdt|ƒƒ}x|j|ƒD] }|VqnWdS)z�Recursively yield all existing files (of any kind, including directories) matching the given pattern, anywhere in this subtree. z%Non-relative patterns are unsupportedú**N)r4)rÑr9r7r rÀrërÊ)r$r1r2r3r½r2rZrrrÚrglob/s  z Path.rglobcCs\|jr|jƒ|jƒr#|S|jtjƒg|jddƒ}|jd|ƒ|S)aReturn an absolute version of this path. This function works even if the path doesn't point to anything. No normalization is done, i.e. all '.' and '..' will be kept along. Use resolve() to get the canonical path to a file. ròFr )rr!r‹rèr^r_rÛrñ)r$ÚobjrrrÚabsolute;s   %z Path.absolutecCsŽ|jr|jƒ|jj|ƒ}|dkrM|jƒt|jƒƒ}|jjj|ƒ}|j |fddƒ}|j d|ƒ|S)z± Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows). NròFr ) rr!rÑrbr¥r]r7rxÚnormpathrèrñ)r$rYZnormedr6rrrrbMs    z Path.resolvecCs|jj|ƒS)zh Return the result of the stat() system call on this path, like os.stat() does. )rŠr¥)r$rrrr¥asz Path.statcCs%ddl}|j|jƒjƒjS)z: Return the login name of the file owner. rN)rŽr�r¥Úst_uidÚpw_name)r$rŽrrrÚownerhs z Path.ownercCs%ddl}|j|jƒjƒjS)z8 Return the group name of the file gid. rN)ÚgrpÚgetgrgidr¥Úst_gidÚgr_name)r$r<rrrÚgroupos z Path.groupÚrr8c Cs>|jr|jƒtjt|ƒ|||||d|jƒS)z| Open the file pointed by this path and return a file object, as the built-in open() function does. Zopener)rr!Úior§r]r()r$r¡Ú bufferingÚencodingÚerrorsÚnewlinerrrr§vs  !z Path.openc Cs*|jddƒ�}|jƒSWdQRXdS)zK Open the file in bytes mode, read it, and close the file. r¡ÚrbN)r§Úread)r$rörrrÚ read_bytes�szPath.read_bytesc Cs6|jddd|d|ƒ�}|jƒSWdQRXdS)zJ Open the file in text mode, read it, and close the file. r¡rArDrEN)r§rH)r$rDrErörrrÚ read_textˆs!zPath.read_textc Cs9t|ƒ}|jddƒ�}|j|ƒSWdQRXdS)zO Open the file in bytes mode, write to it, and close the file. r¡ÚwbN)Ú memoryviewr§Úwrite)r$ÚdataÚviewrörrrÚ write_bytes�s zPath.write_bytesc Cs^t|tƒs%td|jjƒ‚|jddd|d|ƒ�}|j|ƒSWdQRXdS)zN Open the file in text mode, write to it, and close the file. zdata must be str, not %sr¡ÚwrDrEN)rír]rîrêr;r§rM)r$rNrDrErörrrÚ write_text˜s !zPath.write_textTc Cs�|jr|jƒ|rIy|jj|dƒWntk rDYnXdStjtjB}|sl|tjO}|j ||ƒ}tj |ƒdS)zS Create this file with the given access mode, if it doesn't exist. N) rr!rŠr°r�r^ÚO_CREATÚO_WRONLYÚO_EXCLr)Úclose)r$r¡Úexist_okr'ÚfdrrrÚtouch¢s    z Path.touchFc Cs¶|jr|jƒy|jj||ƒWn…tk r‰| sP|j|krS‚|jjddddƒ|j|ddd|ƒYn)tk r±| sª|jƒ r­‚YnXdS)z< Create a new directory at this given path. rTrWFN)rr!rŠr«ÚFileNotFoundErrorrr�rÆ)r$r¡rrWrrrr«¹s    z Path.mkdircCs*|jr|jƒ|jj||ƒdS)zF Change the permissions of the path, like os.chmod(). N)rr!rŠr©)r$r¡rrrr©Ìs  z Path.chmodcCs*|jr|jƒ|jj||ƒdS)z� Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's. N)rr!rŠrŸ)r$r¡rrrrŸÔs  z Path.lchmodcCs'|jr|jƒ|jj|ƒdS)zd Remove this file or link. If the path is a directory, use rmdir() instead. N)rr!rŠr¬)r$rrrr¬Ýs  z Path.unlinkcCs'|jr|jƒ|jj|ƒdS)zF Remove this directory. The directory must be empty. N)rr!rŠr­)r$rrrr­æs  z Path.rmdircCs#|jr|jƒ|jj|ƒS)z– Like stat(), except if the path points to a symlink, the symlink's status information is returned, rather than its target's. )rr!rŠr¦)r$rrrr¦îs  z Path.lstatcCs*|jr|jƒ|jj||ƒdS)z5 Rename this path to the given path. N)rr!rŠr®)r$r…rrrr®÷s  z Path.renamecCs*|jr|jƒ|jj||ƒdS)zo Rename this path to the given path, clobbering the existing destination if it exists. N)rr!rŠr*)r$r…rrrr*ÿs  z Path.replacecCs-|jr|jƒ|jj|||ƒdS)z™ Make this path a symlink pointing to the given path. Note the order of arguments (self, target) is the reverse of os.symlink's. N)rr!rŠr¤)r$r…r£rrrÚ symlink_tos  zPath.symlink_tocCsVy|jƒWnAtk rQ}z!|jttfkr;‚dSWYdd}~XnXdS)z+ Whether this path exists. FNT)r¥r�r‚rr)r$r†rrrrÇsz Path.existscCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)z3 Whether this path is a directory. FN)rr¥Úst_moder�r‚rr)r$r†rrrrÆs z Path.is_dircCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)zq Whether this path is a regular file (also True for symlinks pointing to regular files). FN)r r¥r\r�r‚rr)r$r†rrrÚis_file,s z Path.is_filecCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)z7 Whether this path is a symbolic link. FN)r r¦r\r�r‚rr)r$r†rrrrÔ:s zPath.is_symlinkcCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)z6 Whether this path is a block device. FN)r r¥r\r�r‚rr)r$r†rrrÚis_block_deviceFs zPath.is_block_devicecCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)z: Whether this path is a character device. FN)r r¥r\r�r‚rr)r$r†rrrÚis_char_deviceSs zPath.is_char_devicecCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)z. Whether this path is a FIFO. FN)rr¥r\r�r‚rr)r$r†rrrÚis_fifo`s z Path.is_fifocCs_yt|jƒjƒSWnAtk rZ}z!|jttfkrD‚dSWYdd}~XnXdS)z0 Whether this path is a socket. FN)r r¥r\r�r‚rr)r$r†rrrÚ is_socketms zPath.is_socketcCs�|jp|j r}|jr}|jddd…dkr}|jj|jddd…ƒ}|j|g|jdd…ƒS|S)zl Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser) rNr8ú~)rÙrÚrÛrÑrurè)r$ZhomedirrrrÚ expanduserzs &#!zPath.expanduser)rŠrrN)0r;r<r=rãrérñrËr"r&r!r(r)rr*r+r.r0r3r5r7rbr¥r;r@r§rIrJrPrRrYr«r©rŸr¬r­r¦r®r*r[rÇrÆr]rÔr^r_r`rarcrrrrrÀs\                        c@seZdZfZdS)rN)r;r<r=rãrrrrr†s c@s.eZdZfZdd„Zdd„ZdS)rcCstdƒ‚dS)Nz*Path.owner() is unsupported on this system)r )r$rrrr;ŒszWindowsPath.ownercCstdƒ‚dS)Nz*Path.group() is unsupported on this system)r )r$rrrr@�szWindowsPath.groupN)r;r<r=rãr;r@rrrrr‰s  )=rÏršrBrwr^r“rÍr.Ú collectionsrÚ contextlibrr‚rrrÚoperatorrr¥rr r r r r rZ urllib.parserrkr¯ryrZgetwindowsversionrÚ__all__r rðr!r?r~rrr”r•rr¸rÀrªrÁrÂrÄr¼r»r¹r×rrrrrrrrrrÚsd        4 "   ?˜b  ;  'ÿZÿÇ