+
    üÐj’& ã                  ó²  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
Ht ^ RIHtHtHtHtHtHtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
I H!t! ^ RI"H#t# ^ RI$H%t& ]!PN                  ! 4       '       * t( ! R R]&4      t) ! R R])4      t* ! R R]PV                  ],          4      t,]PB                  R8w  d    ! R R4      t- ! R R])4      t. ! R R4      t/ ! R R]PV                  ],          4      t0 ! R R]PV                  ],          4      t1]! R4      t2 ! R R ])4      t3 ! R! R"]*4      t4 ! R# R$])4      t5 ! R% R&]&4      t6R# )'z1
Test cases covering L{twisted.python.filepath}.
)ÚannotationsN)Úpformat)	ÚIOÚAnyStrÚCallableÚDictÚListÚOptionalÚTupleÚTypeVarÚUnion)ÚskipIf)ÚverifyObject)ÚNoReturn)Úfilepath)ÚFileModeÚOtherAnyStr)Úplatform)ÚERROR_DIRECTORY)ÚSynchronousTestCasec                  ó&   € ] tR t^"tRtR R ltRtR# )ÚBytesTestCasez@
Override default method implementations to support byte paths.
c               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚbytes© )Úformats   "Ú9/usr/lib/python3/dist-packages/twisted/test/test_paths.pyÚ__annotate__ÚBytesTestCase.__annotate__'   s   € ÷ 5ñ 5˜ñ 5ó    c                óL   € \         P                  ! V 4      P                  R4      # )z,
Return a temporary path, encoded as bytes.
úutf-8)ÚTestCaseÚmktempÚencode©Úselfs   &r   r%   ÚBytesTestCase.mktemp'   s   € ô �Š˜tÓ$×+Ñ+¨GÓ4Ð4r!   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r%   Ú__static_attributes__r   r!   r   r   r   "   s   † ñ÷5ñ 5r!   r   c                  ó  € ] tR t^.tRtRtRtR R ltR R ltR R	 lt	R
 R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR*tR+# ),ÚAbstractFilePathTestsz)
Tests for L{IFilePath} implementations.
ó   file 1s   file 2c               ó    € V ^8„  d   QhRRRR/# )r   Úpr   r   r   )r   s   "r   r   Ú"AbstractFilePathTests.__annotate__6   s   € ÷ ñ ˜%ð  Eñ r!   c                	óÎ   € \         P                  P                  \         P                  P                  ! V P                  .VO5!  4      pV P
                  P                  V4       V# ©N)ÚosÚpathÚabspathÚjoinÚcmnÚallÚappend)r(   r4   Úxs   &* r   Ú_mkpathÚAbstractFilePathTests._mkpath6   s?   € Ü�G‰G�O‰OœBŸG™GŸLšL¨¯©Ð6°AÓ6Ó7ˆØ�‰�‰˜ÔØˆr!   c               ó    € V ^8„  d   QhRRRR/# )r   Údirnamer   r   ÚNoner   )r   s   "r   r   r5   ;   s   € ÷ )ñ )˜uð )¨ñ )r!   c                	óN   € \         P                  ! V P                  ! V!  4       R # r7   )r8   Úmkdirr@   ©r(   rC   s   &*r   ÚsubdirÚAbstractFilePathTests.subdir;   s   € Ü
�Š�—’˜wÑ'Ö(r!   c               ó    € V ^8„  d   QhRRRR/# )r   rC   r   r   zio.BufferedWriterr   )r   s   "r   r   r5   >   s   € ÷ 2ñ 2 ð 2Ð*;ñ 2r!   c                	ó6   € \        V P                  ! V!  R 4      # )Úwb)Úopenr@   rG   s   &*r   ÚsubfileÚAbstractFilePathTests.subfile>   s   € Ü�D—L’L 'Ñ*¨DÓ1Ð1r!   c               ó   € V ^8„  d   QhRR/# ©r   r   rD   r   )r   s   "r   r   r5   A   s   € ÷ ,ñ ,�tñ ,r!   c                	óŽ  € \         P                   ! 4       V n        \        P                  P	                  V P                  4       4      ;qn        V.V n        \        P                  ! V4       V P                  R 4       V P                  R4      ;_uu_ 4       pVP                  V P                  4       RRR4       V P                  R R4      ;_uu_ 4       pVP                  V P                  4       RRR4       V P                  R4       V P                  RR4      P                  4        V P                  RR4      P                  4        V P                  RR4      P                  4        \        P                   ! V4      V n        \        P                   ! R4      V n        R#   + '       g   i     L÷; i  + '       g   i     LÌ; i)	ó   sub1ó   file1Nó   file2ó   sub3ó
   file3.ext1s
   file3.ext2s
   file3.ext3ó   /)ÚtimeÚnowr8   r9   r:   r%   r<   r=   rF   rH   rN   ÚwriteÚ	f1contentÚ	f2contentÚcloser   ÚFilePathÚroot)r(   r<   Úfs   &  r   ÚsetUpÚAbstractFilePathTests.setUpA   s  € Ü—9’9“;ˆŒÜŸ™Ÿ™¨¯©«Ó7Ð7ˆŒhØ�5ˆŒÜ
�Š�ŒØ�‰�GÔØ�\‰\˜(×#Ô# qØ�G‰G�D—N‘NÔ#÷ $à�\‰\˜' 8×,Ô,°Ø�G‰G�D—N‘NÔ#÷ -à�‰�GÔØ�‰�W˜mÓ,×2Ñ2Ô4Ø�‰�W˜mÓ,×2Ñ2Ô4Ø�‰�W˜mÓ,×2Ñ2Ô4Ü×%Ò% cÓ*ˆŒ	Ü×%Ò% dÓ+ˆŽ	÷ $×#úç,×,ús   ÂF!ÃF4Æ!F1	Æ4G	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   R   s   € ÷ Eñ E 4ñ Er!   c                ól   € V P                  \        \        P                  V P                  4      4       R# )z?
Instances of the path type being tested provide L{IFilePath}.
N)Ú
assertTruer   r   Ú	IFilePathr9   r'   s   &r   Útest_verifyObjectÚ'AbstractFilePathTests.test_verifyObjectR   s!   € ð 	�‰œ¤X×%7Ñ%7¸¿¹ÓCÖDr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   X   s   € ÷ 
ñ 
¨4ñ 
r!   c                óÎ   € V P                  V P                  P                  R4      P                  R4      P                  R4      P                  V P                  4      . RO4       R# )zF
Verify that the segments between two paths are correctly identified.
ó   aó   bó   cN©rl   rm   rn   )ÚassertEqualr9   ÚchildÚsegmentsFromr'   s   &r   Útest_segmentsFromPositiveÚ/AbstractFilePathTests.test_segmentsFromPositiveX   sJ   € ð 	×ÑØ�I‰I�O‰O˜DÓ!×'Ñ'¨Ó-×3Ñ3°DÓ9×FÑFÀtÇyÁyÓQÚö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   a   s   € ÷ 
ñ 
¨4ñ 
r!   c                ó$  € V P                  \        V P                  P                  R4      P                  R4      P                  R4      P                  V P                  P                  R4      P                  R4      P                  R4      4       R# )zG
Verify that segmentsFrom notices when the ancestor isn't an ancestor.
rl   rm   rn   ó   dó   eN)ÚassertRaisesÚ
ValueErrorr9   rq   rr   r'   s   &r   Útest_segmentsFromNegativeÚ/AbstractFilePathTests.test_segmentsFromNegativea   sg   € ð 	×ÑÜØ�I‰I�O‰O˜DÓ!×'Ñ'¨Ó-×3Ñ3°DÓ9×FÑFØ�I‰I�O‰O˜DÓ!×'Ñ'¨Ó-×3Ñ3°DÓ9ö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   k   s   € ÷ 0ñ 0˜4ñ 0r!   c                óÐ   € V P                   P                  4        Uu. uF  qP                   NK  	  ppV P                  \        V4      \        V P                  4      4       R# u upi )zQ
Verify that walking the path gives the same result as the known file
hierarchy.
N)r9   Úwalkrp   Úsetr=   )r(   Úfoor?   s   &  r   Ú	test_walkÚAbstractFilePathTests.test_walkk   sH   € ð
 "&§¡§¡Ô!1Ó2Ñ!1˜#�XŒXÑ!1ˆÐ2Ø×Ñœ˜Q›¤ T§X¡X£Ö/ùò 3s   �A#c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   s   s   € ÷ Añ A˜dñ Ar!   c                óî  € . pV P                   P                  R4      P                  R4      P                  R4      pVP                   pTp\        P                   P                  V4      pW@P                  P                   8w  d5   VP                  V4       Tp\        P                   P                  V4      pKN  T P                  VP                  4        Uu. uF  qfP                   NK  	  upV4       R# u upi )zc
L{FilePath.parents()} should return an iterator of every ancestor of
the L{FilePath} in question.
rl   rm   rn   N)r9   rq   r8   rC   r`   r>   rp   Úparents)r(   ÚLÚpathobjÚfullpathÚlastpathÚthispathr?   s   &      r   Útest_parentsÚ"AbstractFilePathTests.test_parentss   s¯   € ð
 ˆØ—)‘)—/‘/ $Ó'×-Ñ-¨dÓ3×9Ñ9¸$Ó?ˆØ—<‘<ˆØˆÜ—7‘7—?‘? 8Ó,ˆØŸ)™)Ÿ.™.Ô(Ø�H‰H�XÔØˆHÜ—w‘w—‘ xÓ0ŠHØ×Ñ¨'¯/©/Ô*;Ó<Ñ*; QŸ&œ&Ñ*;Ñ<¸aÖ@ùÒ<s   ÃC2c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   ƒ   s   € ÷ 
5ñ 
5 $ñ 
5r!   c                ó~  € V P                   P                  R4      pV P                  VP                  4       R4       V P                  VP	                  4       R4       V P                  VP                  4       R4       V P                  VP                  4       R4       V P                  VP                  4       R.4       R# )zu
Verify that a valid subdirectory will show up as a directory, but not as a
file, not as a symlink, and be listable.
rS   zThis directory does exist.zIt's a directory.rU   N)
r9   rq   rf   ÚexistsÚisdirÚassertFalseÚisfileÚislinkrp   Úlistdir)r(   Úsub1s   & r   Útest_validSubdirÚ&AbstractFilePathTests.test_validSubdirƒ   s†   € ð
 �y‰y�‰˜wÓ'ˆØ�‰˜Ÿ™›Ð'CÔDØ�‰˜Ÿ
™
›Ð&9Ô:Ø×Ñ˜Ÿ™›Ð(;Ô<Ø×Ñ˜Ÿ™›Ð(;Ô<Ø×Ñ˜Ÿ™›¨(¨Ö4r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   �   s   € ÷ Jñ J Dñ Jr!   c                ó|   € V P                   P                  R4      pV P                  VP                  4       R4       R# )zD
Verify that a subdirectory that doesn't exist is reported as such.
ó   sub2zThis directory does not exist.N)r9   rq   r’   r�   )r(   Úsub2s   & r   Útest_invalidSubdirÚ(AbstractFilePathTests.test_invalidSubdir�   s-   € ð �y‰y�‰˜wÓ'ˆØ×Ñ˜Ÿ™›Ð(HÖIr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   –   s   € ÷ 	7ñ 	7 ñ 	7r!   c                ó
  € V P                   P                  R4      pVP                  4       ;_uu_ 4       pV P                  VP	                  4       V P
                  4       RRR4       V P                   P                  R4      P                  R4      pVP                  4       ;_uu_ 4       pV P                  VP	                  4       V P                  4       RRR4       R#   + '       g   i     L‡; i  + '       g   i     R# ; i)z6
Make sure that we can read existent non-empty files.
rT   NrS   rU   )r9   rq   rM   rp   Úreadr\   r]   )r(   Úf1ra   Úf2s   &   r   Útest_validFilesÚ%AbstractFilePathTests.test_validFiles–   sŸ   € ð �Y‰Y�_‰_˜XÓ&ˆØ�W‰W�YŒY˜!Ø×Ñ˜QŸV™V›X t§~¡~Ô6÷ à�Y‰Y�_‰_˜WÓ%×+Ñ+¨HÓ5ˆØ�W‰W�YŒY˜!Ø×Ñ˜QŸV™V›X t§~¡~Ô6÷ ‰Y÷ �Yú÷ �YˆYús   ´+CÂ)+C1ÃC.	Ã1D	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   ¡   s   € ÷ +ñ +¨Dñ +r!   c                óÔ   € V P                   P                  . RO4      pV P                   P                  R4      P                  R4      P                  R4      pV P                  W4       R# )zn
C{fp.descendant([a, b, c])} returns the same L{FilePath} as is returned
by C{fp.child(a).child(b).child(c)}.
rl   rm   rn   Nro   )r9   Ú
descendantrq   rp   )r(   ÚmultipleÚsingles   &  r   Útest_multipleChildSegmentsÚ0AbstractFilePathTests.test_multipleChildSegments¡   sO   € ð
 —9‘9×'Ñ'Ò(:Ó;ˆØ—‘—‘ Ó&×,Ñ,¨TÓ2×8Ñ8¸Ó>ˆØ×Ñ˜Ö*r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   ª   s   € ÷ *ñ * Tñ *r!   c                ón  € V P                   P                  R4      pV P                   P                  R4      pV P                   P                  R4      p/ p^WA&   ^WB&   V P                  WA,          ^4       V P                  \        VP	                  4       4      V.4       V P                  \        VP	                  4       4      ^ ,          V4       V P                  \        VP	                  4       4      ^ ,          V4       ^WC&   V P                  WC,          ^4       V P                  \        V4      ^4       R# )z;
Verify that path instances are usable as dictionary keys.
rT   rU   N)r9   rq   rp   ÚlistÚkeysÚassertIsÚassertIsNotÚlen)r(   r¢   Úf1primer£   Údictoids   &    r   Útest_dictionaryKeysÚ)AbstractFilePathTests.test_dictionaryKeysª   sè   € ð �Y‰Y�_‰_˜XÓ&ˆØ—)‘)—/‘/ (Ó+ˆØ�Y‰Y�_‰_˜XÓ&ˆØˆØˆ‰ØˆÑØ×Ñ˜� aÔ(Ø×Ñœ˜gŸl™l›nÓ-°¨tÔ4Ø�‰”d˜7Ÿ<™<›>Ó*¨1Õ-¨rÔ2Ø×Ñœ˜gŸl™l›nÓ-¨aÕ0°'Ô:Øˆ‰Ø×Ñ˜� aÔ(Ø×Ñœ˜W› qÖ)r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   ¼   s   € ÷ *ñ *¨dñ *r!   c                ó–   € V P                   P                  R4      pVR/pRW!P                   &   V P                  \        V4      ^4       R# )zm
Verify that path instances are usable as dictionary keys which do not clash
with their string counterparts.
rT   ÚhelloÚgoodbyeN)r9   rq   rp   r³   )r(   r¢   rµ   s   &  r   Útest_dictionaryKeyWithStringÚ2AbstractFilePathTests.test_dictionaryKeyWithString¼   s?   € ð
 �Y‰Y�_‰_˜XÓ&ˆØFHÈ'À]ˆØ$ˆ—‘ÑØ×Ñœ˜W› qÖ)r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   Æ   s   € ÷ 
ñ 
¨tñ 
r!   c                óŒ   € V P                  \        P                  V P                  P	                  R4      P
                  4       R# )zU
Verify that children raises the appropriate exception for non-existent
directories.
s   not realN©ry   r   ÚUnlistableErrorr9   rq   Úchildrenr'   s   &r   Útest_childrenNonexistentErrorÚ3AbstractFilePathTests.test_childrenNonexistentErrorÆ   s0   € ð
 	×ÑÜ×$Ñ$ d§i¡i§o¡o°kÓ&B×&KÑ&Kö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   Ï   s   € ÷ Xñ X°ñ Xr!   c                óŒ   € V P                  \        P                  V P                  P	                  R4      P
                  4       R# )zm
Verify that listdir raises the appropriate exception for attempting to list
a file rather than a directory.
rT   NrÀ   r'   s   &r   Útest_childrenNotDirectoryErrorÚ4AbstractFilePathTests.test_childrenNotDirectoryErrorÏ   s-   € ð
 	×Ñœ(×2Ñ2°D·I±I·O±OÀHÓ4M×4VÑ4VÖWr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   Ö   s   € ÷ Cñ C¨ñ Cr!   c                óp  € V P                   V P                   P                  R4      3 FŠ  pV P                  \        VP	                  4       4      \
        4       V P                  \        VP                  4       4      \
        4       V P                  \        VP                  4       4      \
        4       KŒ  	  R# )zy
Verify that all times returned from the various new time functions are ints
(and hopefully therefore 'high precision').
rT   N)r9   rq   rp   ÚtypeÚgetAccessTimeÚfloatÚgetModificationTimeÚgetStatusChangeTime©r(   r4   s   & r   Útest_newTimesAreFloatsÚ,AbstractFilePathTests.test_newTimesAreFloatsÖ   s|   € ð
 —‘˜DŸI™IŸO™O¨HÓ5Ó5ˆAØ×ÑœT !§/¡/Ó"3Ó4´eÔ<Ø×ÑœT !×"7Ñ"7Ó"9Ó:¼EÔBØ×ÑœT !×"7Ñ"7Ó"9Ó:¼EÖBó 6r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r5   à   s   € ÷ 6ñ 6 dñ 6r!   c                óp  € V P                   V P                   P                  R4      3 FŠ  pV P                  \        VP	                  4       4      \
        4       V P                  \        VP                  4       4      \
        4       V P                  \        VP                  4       4      \
        4       KŒ  	  R# )za
Verify that all times returned from the various time functions are
integers, for compatibility.
rT   N)r9   rq   rp   rË   ÚgetatimeÚintÚgetmtimeÚgetctimerÐ   s   & r   Útest_oldTimesAreIntsÚ*AbstractFilePathTests.test_oldTimesAreIntsà   su   € ð
 —‘˜DŸI™IŸO™O¨HÓ5Ó5ˆAØ×ÑœT !§*¡*£,Ó/´Ô5Ø×ÑœT !§*¡*£,Ó/´Ô5Ø×ÑœT !§*¡*£,Ó/´Ö5ó 6r!   )r=   r<   rZ   r9   r`   N)r*   r+   r,   r-   r.   r\   r]   r@   rH   rN   rb   rh   rs   r{   r‚   rŒ   r—   r�   r¤   r«   r¶   r¼   rÃ   rÇ   rÑ   rÙ   r/   r   r!   r   r1   r1   .   s|   † ñð €IØ€Iõõ
)õ2õ,õ"Eõ
õ
õ0õAõ 
5õJõ	7õ+õ*õ$*õ
õXõC÷6ñ 6r!   r1   c                  ó&   € ] tR t^ëtRtR R ltRtR# )ÚFakeWindowsPathzN
A test version of FilePath which overrides listdir to raise L{WindowsError}.
c               ó   € V ^8„  d   QhRR/# )r   r   zList[AnyStr]r   )r   s   "r   r   ÚFakeWindowsPath.__annotate__ð   s   € ÷ 
ñ 
˜ñ 
r!   c                ó:   € \        RRV P                  \        4      h)z
@raise WindowsError: always.
Nz0A directory's validness was called into question)ÚOSErrorr9   r   r'   s   &r   r•   ÚFakeWindowsPath.listdirð   s!   € ô ØØ>Ø�I‰IÜó	
ð 	
r!   r   N)r*   r+   r,   r-   r.   r•   r/   r   r!   r   rÜ   rÜ   ë   s   † ñ÷
ñ 
r!   rÜ   Úwin32c                  ó   € ] tR tRtRtR# )ÚWindowsErrori  r   N)r*   r+   r,   r-   r/   r   r!   r   rä   rä     s   † Ûr!   rä   c                  ó~   € ] tR tRtRt]! ]P                  ! 4       '       * R4      R R l4       tR R lt	R R	 lt
R
tR# )ÚListingCompatibilityTestsi  zM
These tests verify compatibility with legacy behavior of directory listing.
zOnly relevant on on Windows.c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   Ú&ListingCompatibilityTests.__annotate__  s   € ÷ 6ñ 6¨ñ 6r!   c                óÌ   € \        V P                  4       4      pV P                  \        P                  VP
                  4       V P                  \        VP
                  4       R# )zV
Verify that when a WindowsError is raised from listdir, catching
WindowsError works.
N)rÜ   r%   ry   r   rÁ   rÂ   rä   )r(   Úfwps   & r   Útest_windowsErrorExceptÚ1ListingCompatibilityTests.test_windowsErrorExcept  sB   € ô ˜dŸk™k›mÓ,ˆØ×Ñœ(×2Ñ2°C·L±LÔAØ×Ñœ,¨¯©Ö5r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rè     s   € ÷ 0ñ 0¨ñ 0r!   c                óŽ   € \         P                  ! V P                  4       4      pV P                  \        VP
                  4       R# )zZ
Verify that in the normal case where a directory does not exist, we will
get an OSError.
N)r   r_   r%   ry   rà   rÂ   ©r(   Úfps   & r   Útest_alwaysCatchOSErrorÚ1ListingCompatibilityTests.test_alwaysCatchOSError  s.   € ô
 ×Ò˜tŸ{™{›}Ó-ˆØ×Ñœ' 2§;¡;Ö/r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rè   "  s   € ÷ !ñ !¨Tñ !r!   c                ó²  € \         P                  ! V P                  4       4      pV P                  \        VP
                  4      p\        VP                  P                  4       4      pVP                  R4       \        VP                  P                  P                  4       4      pVP                  4        VP                  4        V P                  W44       R# )zn
Verify that the Unlistable exception raised will preserve the attributes of
the previously-raised exception.
ÚoriginalExceptionN)r   r_   r%   ry   rà   rÂ   r¯   Ú__dict__r°   Úremoverõ   Úsortrp   )r(   rð   ÚoseÚd1Úd2s   &    r   Útest_keepOriginalAttributesÚ5ListingCompatibilityTests.test_keepOriginalAttributes"  s“   € ô
 ×Ò˜tŸ{™{›}Ó-ˆØ×Ñ¤¨¯©Ó5ˆÜ�#—,‘,×#Ñ#Ó%Ó&ˆØ
�	‰	Ð%Ô&Ü�#×'Ñ'×0Ñ0×5Ñ5Ó7Ó8ˆØ
�‰Œ	Ø
�‰Œ	Ø×Ñ˜Ö r!   r   N)r*   r+   r,   r-   r.   r   r   Ú	isWindowsrë   rñ   rü   r/   r   r!   r   ræ   ræ     s?   † ññ �×"Ò"Ó$Ô$Ð&DÓEô6ó Fð6õ0÷!ñ !r!   ræ   c                  ó^   € ] tR tRtRtRtRR R lltR R ltR R	 ltR
 R lt	R R lt
RtR# )ÚExplodingFilei1  zÊ
A C{file}-alike which raises exceptions from its I/O methods and keeps track
of whether it has been closed.

@ivar closed: A C{bool} which is C{False} until C{close} is called, then it
    is C{True}.
Fc               ó    € V ^8„  d   QhRRRR/# )r   ÚnrÖ   r   r   r   )r   s   "r   r   ÚExplodingFile.__annotate__<  s   € ÷ ñ �cð  (ñ r!   c                ó   € \        4       h©z 
@raise IOError: Always raised.
©rà   )r(   r  s   &&r   r¡   ÚExplodingFile.read<  ó   € ô ‹iˆr!   c               ó    € V ^8„  d   QhRRRR/# )r   Úwhatr   r   r   r   )r   s   "r   r   r  B  s   € ÷ ñ ˜%ð  Hñ r!   c                ó   € \        4       hr  r  )r(   r
  s   &&r   r[   ÚExplodingFile.writeB  r  r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r  H  s   € ÷ ñ �tñ r!   c                ó   € RV n         R# )z&
Mark the file as having been closed.
TN©Úclosedr'   s   &r   r^   ÚExplodingFile.closeH  s   € ð ˆŽr!   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r  N  s   € ÷ ñ ˜=ñ r!   c                	ó   € V # r7   r   r'   s   &r   Ú	__enter__ÚExplodingFile.__enter__N  s   € Øˆr!   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úexc_typeÚobjectÚ	exc_valueÚ	tracebackr   rD   r   )r   s   "r   r   r  Q  s)   € ÷ ñ  ð °Fð Àvð ÐRVñ r!   c                	ó&   € V P                  4        R # r7   )r^   )r(   r  r  r  s   &&&&r   Ú__exit__ÚExplodingFile.__exit__Q  s   € Ø�
‰
Žr!   r  N)é    )r*   r+   r,   r-   r.   r  r¡   r[   r^   r  r  r/   r   r!   r   r   r   1  s,   † ñð €F÷õõõ÷ñ r!   r   c                  óV   € ] tR tRtRtRR R lltRR R lltR R	 ltRR
 R lltRt	R# )ÚTrackingFilePathiU  a7  
A subclass of L{filepath.FilePath} which maintains a list of all other paths
created by clonePath.

@ivar trackingList: A list of all paths created by this path via
    C{clonePath} (which also includes paths created by methods like
    C{parent}, C{sibling}, C{child}, etc (and all paths subsequently created
    by those paths, etc).

@type trackingList: C{list} of L{TrackingFilePath}

@ivar openedFiles: A list of all file objects opened by this
    L{TrackingFilePath} or any other L{TrackingFilePath} in C{trackingList}.

@type openedFiles: C{list} of C{file}
Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r9   r   ÚalwaysCreateÚboolÚtrackingListzEOptional[List[Union[TrackingFilePath[str], TrackingFilePath[bytes]]]]r   rD   r   )r   s   "r   r   ÚTrackingFilePath.__annotate__g  s2   € ÷ /ñ /àð/ð ð/ð
ð	/ð 
ñ/r!   c                	ón   € \         P                  P                  WV4       Vf   . pVV n        . V n        R # r7   )r   r_   Ú__init__r$  ÚopenedFiles)r(   r9   r"  r$  s   &&&&r   r'  ÚTrackingFilePath.__init__g  s<   € ô 	×Ñ×"Ñ" 4¨|Ô<ØÒØˆLð ð 	Ôð -/ˆÖr!   c               ó    € V ^8„  d   QhRRRR/# ©r   Úmoder   r   z	IO[bytes]r   )r   s   "r   r   r%  w  s   € ÷ ñ ˜ð ¨Iñ r!   c                óz   € \         P                  P                  W4      pV P                  P	                  V4       V# )z9
Override 'open' to track all files opened by this path.
)r   r_   rM   r(  r>   ©r(   r,  ra   s   && r   rM   ÚTrackingFilePath.openw  s3   € ô ×Ñ×"Ñ" 4Ó.ˆØ×Ñ×Ñ Ô"Øˆr!   c               ó   € V ^8„  d   QhRR/# )r   r   z;List[Union[TrackingFilePath[str], TrackingFilePath[bytes]]]r   )r   s   "r   r   r%    s   € ÷ Hñ Hà	DñHr!   c                ój   € V P                    Uu. uF  qP                  '       g   K  VNK  	  up# u upi )z�
Return a list of all L{TrackingFilePath}s associated with this
L{TrackingFilePath} that have had their C{open()} method called.
)r$  r(  )r(   r9   s   & r   ÚopenedPathsÚTrackingFilePath.openedPaths  s,   € ð "&×!2Ò!2ÓGÑ!2˜×6FÕ6F—�Ñ!2ÑGÐGùÒGs   �0§0c               ó$   € V ^8„  d   QhRRRRRR/# )r   r9   r   r"  r#  r   zTrackingFilePath[OtherAnyStr]r   )r   s   "r   r   r%  ˆ  s$   € ÷ 	ñ 	Øð	Ø/3ð	à	&ñ	r!   c                óh   € \        WP                  R7      pV P                  P                  V4       V# )ze
Override L{filepath.FilePath.clonePath} to give the new path a reference
to the same tracking list.
)r$  )r   r$  r>   )r(   r9   r"  Úclones   &&& r   Ú	clonePathÚTrackingFilePath.clonePathˆ  s-   € ô ! ×4EÑ4EÔFˆØ×Ñ× Ñ  Ô'Øˆr!   )r(  r$  )FN©Úr©F)
r*   r+   r,   r-   r.   r'  rM   r2  r7  r/   r   r!   r   r   r   U  s!   † ñ÷"/÷ õH÷	ó 	r!   r   c                  óV   € ] tR tRt$ RtR]R&   RR R lltRR R	 lltRR
 R lltRt	R# )ÚExplodingFilePathi”  zÆ
A specialized L{FilePath} which always returns an instance of
L{ExplodingFile} from its C{open} method.

@ivar fp: The L{ExplodingFile} instance most recently returned from the
    C{open} method.
r   rð   Nc               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚpathNamer   ÚoriginalExploderzAOptional[Union[ExplodingFilePath[str], ExplodingFilePath[bytes]]]r   rD   r   )r   s   "r   r   ÚExplodingFilePath.__annotate__Ÿ  s(   € ÷ 2ñ 2àð2ð
ð2ð 
ñ2r!   c                ó\   € \         P                  P                  W4       Vf   T pW n        R# )a!  
Initialize an L{ExplodingFilePath} with a name and a reference to the

@param pathName: The path name as passed to L{filepath.FilePath}.
@type pathName: C{str}

@param originalExploder: The L{ExplodingFilePath} to associate opened
files with.
@type originalExploder: L{ExplodingFilePath}
N)r   r_   r'  Ú_originalExploder)r(   r?  r@  s   &&&r   r'  ÚExplodingFilePath.__init__Ÿ  s*   € ô" 	×Ñ×"Ñ" 4Ô2ØÒ#Ø#ÐØ!1Ör!   c               ó    € V ^8„  d   QhRRRR/# r+  r   )r   s   "r   r   rA  µ  s   € ÷ 	ñ 	˜ð 	¨Iñ 	r!   c                ó:   € \        4       ;q P                  n        V# )z‘
Create, save, and return a new C{ExplodingFile}.

@param mode: Present for signature compatibility.  Ignored.

@return: A new C{ExplodingFile}.
)r   rC  rð   r.  s   && r   rM   ÚExplodingFilePath.openµ  s   € ô )6«Ð7ˆ×"Ñ"Ô%Øˆr!   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Únamer   r"  r#  r   zfilepath.FilePath[OtherAnyStr]r   )r   s   "r   r   rA  À  s$   € ÷ ?ñ ?Øð?Ø/3ð?à	'ñ?r!   c                	ó,   € \        WP                  4      # r7   )r=  rC  )r(   rI  r"  s   &&&r   r7  ÚExplodingFilePath.clonePathÀ  s   € ô ! ×'=Ñ'=Ó>Ð>r!   )rC  r7   r9  r;  )
r*   r+   r,   r-   r.   Ú__annotations__r'  rM   r7  r/   r   r!   r   r=  r=  ”  s#   ‡ ñð 	Ó÷2÷,	÷?ó ?r!   r=  ÚTc                  ó~   € ] tR tRtRtRR R lltR R ltR R	 ltR
 R ltR R lt	R R lt
R R ltR R ltRtR# )ÚPermissionsTestsiÉ  z"
Test Permissions and RWX classes
Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   ÚfirstrM  Úsecondr  ÚmsgzOptional[str]r   r   )r   s   "r   r   ÚPermissionsTests.__annotate__Î  s,   € ÷ ñ ØðØ &ðØ-:ðà	
ñr!   c           	     ó®   € W8w  dO   Vf   Rp\        V4      ^ 8”  d
   VR,          pV P                  V: R\        V4      : R\        V4      : R24      hV# )zÒ
Tests that C{first} != C{second} is false.  This method tests the
__ne__ method, as opposed to L{assertEqual} (C{first} == C{second}),
which tests the __eq__ method.

Note: this should really be part of trial
Ú Ú
z8not not unequal (__ne__ not implemented correctly):
a = z
b = )r³   ÚfailureExceptionr   )r(   rQ  rR  rS  s   &&&&r   ÚassertNotUnequalÚ!PermissionsTests.assertNotUnequalÎ  sV   € ð Œ?ØŠ{Ø�Ü�3‹x˜!Œ|Ø�t•�Ø×'Ñ'ã(+¬W°U®^¼WÀV¾_ðNóð ð ˆr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT  ã  s   € ÷ $ñ $˜4ñ $r!   c                ó6  € V P                  \        4      ;_uu_ 4       pV P                  ^^R4       RRR4       V P                  R\	        XP
                  4      4       V P                  R\	        VP
                  4      4       V P                  \        4      ;_uu_ 4       pV P                  ^^4       RRR4       V P                  R\	        XP
                  4      4       V P                  ^^4       R#   + '       g   i     LË; i  + '       g   i     L\; i)zB
Self-test for assertNotUnequal to make sure the assertion works.
zcustom messageNz __ne__ not implemented correctly)ry   ÚAssertionErrorrY  ÚassertInÚstrÚ	exception)r(   ÚaeÚae2s   &  r   Ú	test_testÚPermissionsTests.test_testã  sÁ   € ð ×Ñœ~×.Ô.°"Ø×!Ñ! ! QÐ(8Ô9÷ /à�‰Ð8¼#¸b¿l¹lÓ:KÔLØ�‰Ð&¬¨B¯L©LÓ(9Ô:Ø×Ñœ~×.Ô.°#Ø×!Ñ! ! QÔ'÷ /à�‰Ð8¼#¸c¿m¹mÓ:LÔMØ×Ñ˜a Ö#÷ /×.ú÷ /×.ús   žC5Â!DÃ5D	ÄD	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT  ð  s   € ÷ @ñ @ 4ñ @r!   c                óÈ  € R F€  pR Fw  pR Fn  p\         P                  ! WV4      pV P                  VP                  V4       V P                  VP                  V4       V P                  VP
                  V4       Kp  	  Ky  	  K‚  	  \         P                  ! RRR4      pT P                  VP                  ;'       d!    VP                  ;'       d    VP
                  4       R# )z.
L{RWX}'s constructor takes a set of booleans
TN©TF)r   ÚRWXrp   r¡   r[   Úexecuterf   )r(   r:  Úwr?   Úrwxs   &    r   Útest_rwxFromBoolsÚ"PermissionsTests.test_rwxFromBoolsð  sª   € ó ˆAÛ"�Û&�AÜ"Ÿ,š, q¨QÓ/�CØ×$Ñ$ S§X¡X¨qÔ1Ø×$Ñ$ S§Y¡Y°Ô2Ø×$Ñ$ S§[¡[°!Ö4ó	 'ó #ñ ô �lŠl˜4  tÓ,ˆØ�‰˜Ÿ™×>Ð> S§Y¡Y×>Ð>°3·;±;Ö?r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT  þ  s   € ÷ ?ñ ?˜dñ ?r!   c                óø  € R F�  pR F„  pR F{  pV P                  \        P                  ! WV4      \        P                  ! WV4      4       V P                  \        P                  ! WV4      \        P                  ! WV4      4       K}  	  K†  	  K�  	  V P	                  \        P                  ! RRR4      \        P                  ! RRR4      4       V P	                  ^\        P                  ! RRR4      4       R# )zi
L{RWX}'s created with the same booleans are equivalent.  If booleans
are different, they are not equal.
TFNrg  )rp   r   rh  rY  ÚassertNotEqual)r(   r:  rj  r?   s   &   r   Útest_rwxEqNeÚPermissionsTests.test_rwxEqNeþ  s½   € ó
 ˆAÛ"�Û&�AØ×$Ñ$¤X§\¢\°!¸Ó%:¼H¿LºLÈÈqÓ<QÔRØ×)Ñ)¬(¯,ª,°q¸QÓ*?ÄÇÂÈaÐTUÓAVÖWó 'ó #ñ ð
 	×ÑÜ�LŠL˜˜t TÓ*¬H¯LªL¸¸tÀUÓ,Kô	
ð 	×Ñ˜AœxŸ|š|¨D°$¸Ó=Ö>r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT    s   € ÷ Mñ M 4ñ Mr!   c                óh  € R R lpR
 Fo  pR
 Ff  pR
 F]  p\         P                  ! W#V4      pV P                  VP                  4       V! VR4      V! VR4      ,           V! VR4      ,           4       K_  	  Kh  	  Kq  	  V P                  \         P                  ! RRR4      P                  4       R4       R	# )z²
L{RWX}'s shorthand string should be 'rwx' if read, write, and execute
permission bits are true.  If any of those permissions bits are false,
the character is replaced by a '-'.
c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úvalr#  Úletterr_  r   r   )r   s   "r   r   Ú8PermissionsTests.test_rwxShorthand.<locals>.__annotate__  s!   € ÷ 	ñ 	˜ð 	 sð 	¨sñ 	r!   c                ó   € V '       d   V# R # )Ú-r   )rv  rw  s   &&r   ÚgetCharÚ3PermissionsTests.test_rwxShorthand.<locals>.getChar  s   € ßØ�Ùr!   TFr:  rj  r?   zr-xNrg  )r   rh  rp   Ú	shorthand)r(   r{  r:  rj  r?   rk  s   &     r   Útest_rwxShorthandÚ"PermissionsTests.test_rwxShorthand  s•   € õ	ó
 ˆAÛ"�Û&�AÜ"Ÿ,š, q¨QÓ/�CØ×$Ñ$ØŸ™›Ù  3›©'°!°S«/Õ9¹GÀAÀs»OÕKöó 'ó #ñ ð 	×ÑœŸš d¨E°4Ó8×BÑBÓDÀeÖLr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT  #  s   € ÷ 'Cñ 'C¨$ñ 'Cr!   c           
     ó¨  € R R lp\        ^ ^4       Fï  p\        ^ ^4       FÜ  p\        ^ ^4       FÉ  pRW#V3,          p\        V^4      p\        P                  ! V4      pV P	                  VP
                  V! VR4      V RVP
                   24       V P	                  VP                  V! VR4      V RVP                   24       V P	                  VP                  V! VR4      V R	VP                   24       KË  	  KÞ  	  Kñ  	  \        P                  ! R
4      pR F0  pR F'  p	V P                  \        \        Wx4      V	4      4       K)  	  K2  	  R# )z‚
L{Permissions}'s constructor takes a valid permissions bitmask and
parsaes it to produce the correct set of boolean permissions.
c               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚstatModeIntrÖ   Úwhor_  r   zfilepath.RWXr   )r   s   "r   r   Ú?PermissionsTests.test_permissionsFromStat.<locals>.__annotate__)  s!   € ÷ 	ñ 	 cð 	°ð 	¸ñ 	r!   c                óX   a aa€ R  V 3R llo\         P                  ! VV3R lR 4       !  # )c               ó$   € V ^8„  d   QhRRRRRR/# )r   r
  r_  r„  r   r#  r   )r   s   "r   r   ÚUPermissionsTests.test_permissionsFromStat.<locals>._rwxFromStat.<locals>.__annotate__*  s!   € ÷ 4ñ 4 sð 4°ð 4¸ñ 4r!   c                óF   <€ \        \        R V  V 24      pSV,          ^ 8„  # )ÚS_I)ÚgetattrÚstat)r
  r„  Úconstantrƒ  s   && €r   ÚgetPermissionBitÚYPermissionsTests.test_permissionsFromStat.<locals>._rwxFromStat.<locals>.getPermissionBit*  s*   ø€ Ü '¬°°D°6¸#¸Ð.?Ó @�Ø# hÕ.°!Ñ3Ð3r!   c              3  ó6   <"  € T F  pS! VS4      x € K  	  R # 5ir7   r   )Ú.0r
  rŽ  r„  s   & €€r   Ú	<genexpr>ÚRPermissionsTests.test_permissionsFromStat.<locals>._rwxFromStat.<locals>.<genexpr>/  s   øé € ÐJ¹/°$Ñ" 4¨×-Ð-»/ùs   ƒ)ÚRÚWÚX)r   rh  )rƒ  r„  rŽ  s   ff@r   Ú_rwxFromStatÚ?PermissionsTests.test_permissionsFromStat.<locals>._rwxFromStat)  s(   ú€ ÷4ð 4ô —<’<ÝJ¹/ÓJñð r!   z%d%d%dÚUSRz: got user: ÚGRPz: got group: ÚOTHz: got other: éÿ  N)ÚuserÚgroupÚother)r¡   r[   ri  )
ÚrangerÖ   r   ÚPermissionsrp   r�  rž  rŸ  rf   r‹  )
r(   r—  ÚuÚgÚoÚchmodStringÚchmodValÚpermr„  r
  s
   &         r   Útest_permissionsFromStatÚ)PermissionsTests.test_permissionsFromStat#  s8  € õ	ô �q˜!–ˆAÜ˜1˜a–[�Ü˜q !ž�AØ"*¨a°A¨YÕ"6�KÜ" ;°Ó2�HÜ#×/Ò/°Ó9�DØ×$Ñ$ØŸ	™	Ù$ X¨uÓ5Ø&˜- |°D·I±I°;Ð?ôð
 ×$Ñ$ØŸ
™
Ù$ X¨uÓ5Ø&˜- }°T·Z±Z°LÐAôð
 ×$Ñ$ØŸ
™
Ù$ X¨uÓ5Ø&˜- }°T·Z±Z°LÐAöó %ó !ñ ô* ×#Ò# EÓ*ˆÛ-ˆCÛ4�Ø—‘¤¬°Ó(:¸DÓ AÖBó 5ó .r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT  L  s   € ÷ <ñ < Dñ <r!   c                ó®  € V P                  \        P                  ! R4      \        P                  ! R4      4       V P                  \        P                  ! R4      \        P                  ! R4      4       V P	                  \        P                  ! R4      \        P                  ! R4      4       V P	                  ^\        P                  ! R4      4       R# )zL
Two L{Permissions}'s that are created with the same bitmask
are equivalent
rœ  éÀ  N)rp   r   r¡  rY  rp  r'   s   &r   Útest_permissionsEqÚ#PermissionsTests.test_permissionsEqL  s’   € ð
 	×Ñœ×-Ò-¨eÓ4´h×6JÒ6JÈ5Ó6QÔRØ×Ñœh×2Ò2°5Ó9¼8×;OÒ;OÐPUÓ;VÔWØ×ÑœH×0Ò0°Ó7¼×9MÒ9MÈeÓ9TÔUØ×Ñ˜Aœx×3Ò3°EÓ:Ö;r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rT  V  s   € ÷ Oñ O¨4ñ Or!   c                óà  € \        ^ ^4       F©  p\        ^ ^4       F–  p\        ^ ^4       Fƒ  p\        P                  ! \        RWV3,          ^4      4      pV P	                  VP                  4       RP                  R VP                  VP                  VP                  3 4       4      4       K…  	  K˜  	  K«  	  V P	                  \        P                  ! R4      P                  4       R4       R# )z¶
L{Permissions}'s shorthand string is the RWX shorthand string for its
user permission bits, group permission bits, and other permission bits
concatenated together, without a space.
z0o%d%d%drV  c              3  ó@   "  € T F  qP                  4       x € K  	  R # 5ir7   )r}  )r‘  r?   s   & r   r’  Ú=PermissionsTests.test_permissionsShorthand.<locals>.<genexpr>b  s   é € ð  Ù3V¨aŸK™KŸM˜MÓ3Vùs   ‚iø  z	rwxrwx---N)
r   r   r¡  rÖ   rp   r}  r;   r�  rž  rŸ  )r(   r¢  r£  r¤  r§  s   &    r   Útest_permissionsShorthandÚ*PermissionsTests.test_permissionsShorthandV  s¾   € ô �q˜!–ˆAÜ˜1˜a–[�Ü˜q !ž�AÜ#×/Ò/´°JÀ!ÈÀÕ4JÈAÓ0NÓO�DØ×$Ñ$ØŸ™Ó(ØŸ™ñ  Ø48·I±I¸t¿z¹zÈ4Ï:É:Ñ3Vó ó öó %ó !ñ ð 	×Ñœ×-Ò-¨eÓ4×>Ñ>Ó@À+ÖNr!   r   r7   )r*   r+   r,   r-   r.   rY  rc  rl  rq  r~  r¨  r­  r³  r/   r   r!   r   rO  rO  É  s:   † ñ÷õ*$õ@õ?õMõ,'CõR<÷Oñ Or!   rO  c                  óè  € ] tR tRtRtR R ltR R lt]! ]R4      R R	 l4       t	]! ]R4      R
 R l4       t
R R lt]! ]R4      R R l4       t]! ]R4      R R l4       t]! ]R4      R R l4       tR R ltR R lt]! ]R4      R R l4       t]! ]R4      R R l4       t]! ]R4      R R l4       tR R ltR  R! ltR" R# ltR$ R% ltR& R' lt]! ]P4                  ! 4       R(8g  R)4      R* R+ l4       t]! ]P4                  ! 4       R(8g  R)4      R, R- l4       tR. R/ ltR0 R1 ltR2 R3 ltR4 R5 lt R6 R7 lt!R8 R9 lt"]! ]R4      R: R; l4       t#R< R= lt$R> R? lt%R@ RA lt&RB RC lt']! ]R4      RD RE l4       t(]! ]R4      RF RG l4       t)RH RI lt*RJ RK lt+RL RM lt,RN RO lt-RP 3RQ RR llt.RS RT lt/RU RV lt0RW RX lt1RY RZ lt2]! ]R4      R[ R\ l4       t3]! ]R4      R] R^ l4       t4R_ R` lt5Ra Rb lt6Rc Rd lt7Re Rf lt8Rg Rh lt9Ri Rj lt:Rk Rl lt;Rm Rn lt<Ro Rp lt=Rq Rr lt>Rs Rt lt?Ru Rv lt@]! ]P‚                  ! 4       Rw4      Rx Ry l4       tBRz R{ ltC]! ]P‚                  ! 4       '       * R|4      R} R~ l4       tDR R€ ltE]! ]P‚                  ! 4       '       * R|4      R� R‚ l4       tF]! ]P‚                  ! 4       Rw4      Rƒ R„ l4       tG]! ]P‚                  ! 4       Rw4      R… R† l4       tHR‡tIRˆ# )‰ÚFilePathTestsii  z²
Test various L{FilePath} path manipulations.

In particular, note that tests defined on this class instead of on the base
class are only run against L{twisted.python.filepath}.
c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   ÚFilePathTests.__annotate__q  s   € ÷ 
ñ 
˜Dñ 
r!   c           
     ó:  € R F”  pV P                   P                  R4      P                  V4       V P                  \        P
                  ! \        P                  ! V P                   P                  R4      P                   4      P                  4      V4       K–  	  R# )z¯
L{FilePath.chmod} modifies the permissions of
the passed file as expected (using C{os.stat} to check). We use some
basic modes that should work everywhere (even on Windows).
rS   N)ém  rœ  )r9   rq   Úchmodrp   rŒ  ÚS_IMODEr8   Úst_mode©r(   r,  s   & r   Ú
test_chmodÚFilePathTests.test_chmodq  sg   € ó #ˆDØ�I‰I�O‰O˜GÓ$×*Ñ*¨4Ô0Ø×ÑÜ—’œRŸWšW T§Y¡Y§_¡_°WÓ%=×%BÑ%BÓC×KÑKÓLÈdöó #r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  }  s   € ÷ 	
ñ 	
˜Tñ 	
r!   c                óš  € V P                   P                  R4      p\        P                  ! VP                   V P	                  R4      4       \        P                  ! VP                  R4      P                   V P	                  R4      4       \        P                  ! VP                  R4      P                   V P	                  RR4      4       R# )z9
Create several symbolic links to files and directories.
rS   ó	   sub1.linkrU   ó
   file2.links   sub1.file2.linkN)r9   rq   r8   Úsymlinkr@   )r(   rH   s   & r   ÚcreateLinksÚFilePathTests.createLinks}  sƒ   € ð —‘—‘ Ó)ˆÜ
�
Š
�6—;‘; §¡¨\Ó :Ô;Ü
�
Š
�6—<‘< Ó)×.Ñ.°·±¸]Ó0KÔLÜ
�
Š
Ø�L‰L˜Ó"×'Ñ'¨¯©°gÐ?QÓ)Rö	
r!   z"Platform does not support symlinksc               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ‰  s   € ÷ 
ñ 
 dñ 
r!   c                ó¢  € V P                  4        \        P                  ! V P                  P	                  R4      P                  V P                  P	                  R4      P                  4       V P                  V P                  P	                  R4      P                  4       V P                  P	                  R4      P	                  R4      4       R# )zL
L{FilePath.realpath} returns the path of the ultimate target of a
symlink.
rÄ  s	   link.linkrS   rU   N)rÆ  r8   rÅ  r9   rq   rp   Úrealpathr'   s   &r   Útest_realpathSymlinkÚ"FilePathTests.test_realpathSymlinkˆ  s‹   € ð 	×ÑÔÜ
�
Š
Ø�I‰I�O‰O˜MÓ*×/Ñ/°·±·±ÀÓ1N×1SÑ1Sô	
ð 	×ÑØ�I‰I�O‰O˜LÓ)×2Ñ2Ó4Ø�I‰I�O‰O˜GÓ$×*Ñ*¨8Ó4ö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ˜  s   € ÷ Rñ R¨dñ Rr!   c                ó   € \         P                  ! V P                  P                  R4      P                  V P                  P                  R4      P                  4       \         P                  ! V P                  P                  R4      P                  V P                  P                  R4      P                  4       V P	                  \
        P                  V P                  P                  R4      P                  4       R# )zl
L{FilePath.realpath} raises L{filepath.LinkError} if the path is a
symbolic link which is part of a cycle.
ó   link1s   link2N)r8   rÅ  r9   rq   ry   r   Ú	LinkErrorrÊ  r'   s   &r   Útest_realpathCyclicalSymlinkÚ*FilePathTests.test_realpathCyclicalSymlink—  s•   € ô 	�
Š
�4—9‘9—?‘? 8Ó,×1Ñ1°4·9±9·?±?À8Ó3L×3QÑ3QÔRÜ
�
Š
�4—9‘9—?‘? 8Ó,×1Ñ1°4·9±9·?±?À8Ó3L×3QÑ3QÔRØ×Ñœ(×,Ñ,¨d¯i©i¯o©o¸hÓ.G×.PÑ.PÖQr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ¡  s   € ÷ Xñ X¨ñ Xr!   c                óª   € V P                  V P                  P                  R4      P                  4       V P                  P                  R4      4       R# )zR
L{FilePath.realpath} returns the path itself if the path is not a
symbolic link.
rS   N)rp   r9   rq   rÊ  r'   s   &r   Útest_realpathNoSymlinkÚ$FilePathTests.test_realpathNoSymlink¡  s7   € ð
 	×Ñ˜Ÿ™Ÿ™¨Ó1×:Ñ:Ó<¸d¿i¹i¿o¹oÈgÓ>VÖWr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ©  s   € ÷ ?ñ ?¨$ñ ?r!   c                óR  a € S P                  4        \        P                  ! S P                  P	                  R4      P                  S P                  P	                  R4      P	                  R4      P                  4       R V 3R llpS P                  \        P                  V4       R# )zD
Verify that walking a path with a cyclical symlink raises an error
rS   ó   sub1.loopylinkc               ó   € V ^8„  d   QhRR/# ©r   r   zList[bytes]r   )r   s   "r   r   Ú<FilePathTests.test_walkCyclicalSymlink.<locals>.__annotate__³  s   € ÷ 	:ñ 	: ñ 	:r!   c                 ót   <€ SP                   P                  4        U u. uF  q P                   NK  	  up # u up i r7   ©r9   r   )r�   r(   s    €r   ÚiterateOverPathÚ?FilePathTests.test_walkCyclicalSymlink.<locals>.iterateOverPath³  s*   ø€ Ø(,¯	©	¯©Ô(8Ó9Ñ(8 —H”HÑ(8Ñ9Ð9ùÒ9s   ž5N)rÆ  r8   rÅ  r9   rq   ry   r   rÐ  )r(   rß  s   f r   Útest_walkCyclicalSymlinkÚ&FilePathTests.test_walkCyclicalSymlink¨  sw   ø€ ð
 	×ÑÔÜ
�
Š
Ø�I‰I�O‰O˜GÓ$×)Ñ)Ø�I‰I�O‰O˜GÓ$×*Ñ*Ð+<Ó=×BÑBô	
÷
	:ð 	:ð 	×Ñœ(×,Ñ,¨oÖ>r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ¹  s   € ÷ +ñ +¸4ñ +r!   c                óN  a a€ S P                  4        \        P                  ! S P                  P	                  R4      P                  S P                  P	                  R4      P	                  R4      P                  4       R R loR VV 3R llpS P                  V! 4       4       R# )z¯
Verify that, after making a path with cyclical symlinks, when the
supplied C{descend} predicate returns C{False}, the target is not
traversed, as if it was a simple symlink.
rS   rÙ  c               ó    € V ^8„  d   QhRRRR/# ©r   r9   zfilepath.FilePath[bytes]r   r#  r   )r   s   "r   r   ÚMFilePathTests.test_walkObeysDescendWithCyclicalSymlinks.<locals>.__annotate__Æ  ó   € ÷ 	%ñ 	%Ð5ð 	%¸$ñ 	%r!   c                ó,   € V P                  4       '       * # r7   ©r”   ©r9   s   &r   Ú
noSymLinksÚKFilePathTests.test_walkObeysDescendWithCyclicalSymlinks.<locals>.noSymLinksÆ  ó   € Ø—{‘{“}Ô$Ð$r!   c               ó   € V ^8„  d   QhRR/# rÛ  r   )r   s   "r   r   rç  É  s   € ÷ 	Lñ 	L ñ 	Lr!   c                 óx   <€ SP                   P                  SR 7       U u. uF  q P                   NK  	  up # u up i )©ÚdescendrÞ  )r�   rì  r(   s    €€r   rß  ÚPFilePathTests.test_walkObeysDescendWithCyclicalSymlinks.<locals>.iterateOverPathÉ  s.   ø€ Ø(,¯	©	¯©¸z¨Ô(JÓKÑ(J —H”HÑ(JÑKÐKùÒKs    7N)rÆ  r8   rÅ  r9   rq   rf   )r(   rß  rì  s   f @r   Ú)test_walkObeysDescendWithCyclicalSymlinksÚ7FilePathTests.test_walkObeysDescendWithCyclicalSymlinks¸  sw   ù€ ð 	×ÑÔä
�
Š
Ø�I‰I�O‰O˜GÓ$×)Ñ)Ø�I‰I�O‰O˜GÓ$×*Ñ*Ð+<Ó=×BÑBô	
õ
	%÷	Lñ 	Lð 	�‰™Ó)Ö*r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Ï  s   € ÷ 0ñ 0 tñ 0r!   c                ó   € V P                  4        R R lpV P                  P                  VR7       Uu. uF  q"P                  NK  	  ppV P                  \	        V4      \	        V P
                  4      4       R# u upi )zc
Verify that when the supplied C{descend} predicate returns C{False},
the target is not traversed.
c               ó    € V ^8„  d   QhRRRR/# ræ  r   )r   s   "r   r   Ú9FilePathTests.test_walkObeysDescend.<locals>.__annotate__Ö  rè  r!   c                ó,   € V P                  4       '       * # r7   rê  rë  s   &r   rì  Ú7FilePathTests.test_walkObeysDescend.<locals>.noSymLinksÖ  rî  r!   rñ  N)rÆ  r9   r   rp   r€   r=   )r(   rì  r�   r?   s   &   r   Útest_walkObeysDescendÚ#FilePathTests.test_walkObeysDescendÎ  s`   € ð 	×ÑÔõ	%ð "&§¡§¡¸
 Ô!CÓDÑ!C˜#�XŒXÑ!CˆÐDØ×Ñœ˜Q›¤ T§X¡X£Ö/ùò Es   µA;c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Ü  s   € ÷ .ñ . ñ .r!   c                	ó   € R pV P                   P                  R4      P                  V4       V P                   P                  R4      P                  4       pV P	                  W4       RpV P                   P                  R4      P                  VR4       V P                   P                  R4      P                  4       pV P	                  W4       R# )s
   newcontents   news   contents   .tmpN)r9   rq   Ú
setContentÚ
getContentrp   )r(   ÚcontentÚ
newcontents   &  r   Útest_getAndSetÚFilePathTests.test_getAndSetÜ  s–   € ØˆØ�	‰	�‰˜Ó×*Ñ*¨7Ô3Ø—Y‘Y—_‘_ VÓ,×7Ñ7Ó9ˆ
Ø×Ñ˜Ô-ØˆØ�	‰	�‰˜Ó×*Ñ*¨7°GÔ<Ø—Y‘Y—_‘_ VÓ,×7Ñ7Ó9ˆ
Ø×Ñ˜Ö-r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  æ  s   € ÷ &ñ &¨Dñ &r!   c                ó¦   € \        R4      pV P                  \        VP                  4       V P	                  VP
                  P                  4       R# )z
If reading from the underlying file raises an exception,
L{FilePath.getContent} raises that exception after closing the file.
rV  N)r=  ry   ÚIOErrorr  rf   rð   r  rï   s   & r   Útest_getContentFileClosingÚ(FilePathTests.test_getContentFileClosingæ  s6   € ô
 ˜rÓ"ˆØ×Ñœ' 2§=¡=Ô1Ø�‰˜Ÿ™Ÿ™Ö%r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ð  s   € ÷ $ñ $ 4ñ $r!   c                óÀ  € V P                   P                  R4      pV P                   P                  R4      p\        P                  ! VP                   VP                   4       V P	                  VP                  4       4       V P                  VP                  4       4       V P	                  VP                  4       4       V P	                  VP                  4       4       R# )z›
Verify the behavior of the C{isLink} method against links and
non-links. Also check that the symbolic link shares the directory
property with its target.
s   sub4rV   N)r9   rq   r8   rÅ  rf   r”   r’   r‘   )r(   Ús4Ús3s   &  r   Útest_symbolicLinkÚFilePathTests.test_symbolicLinkï  sˆ   € ð �Y‰Y�_‰_˜WÓ%ˆØ�Y‰Y�_‰_˜WÓ%ˆÜ
�
Š
�2—7‘7˜BŸG™GÔ$Ø�‰˜Ÿ	™	›Ô$Ø×Ñ˜Ÿ™›Ô%Ø�‰˜Ÿ™›
Ô#Ø�‰˜Ÿ™›
Ö#r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ÿ  s   € ÷ =ñ =˜Tñ =r!   c                ó,  € V P                   P                  R4      V P                   P                  R4      3V P                   P                  R4      P                  R4      V P                   P                  R4      3.pV F’  w  r#VP                  V4       V P                  VP	                  4       R4       V P                  VP                  4       VP                  4       4       V P                  VP                  4       VP                  4       4       K”  	  R# )z’
Verify that symlink creates a valid symlink that is both a link and a
file if its target is a file, or a directory if its target is a
directory.
r›   s	   sub2.linkrW   s   file3.ext1.linkzThis is a linkN)r9   rq   ÚlinkTorf   r”   rp   r‘   r“   )r(   ÚtargetLinksÚtargetÚlinks   &   r   Útest_linkToÚFilePathTests.test_linkToþ  sÅ   € ð �Y‰Y�_‰_˜WÓ% t§y¡y§¡°|Ó'DÐEà—	‘	—‘ Ó(×.Ñ.¨}Ó=Ø—	‘	—‘Ð 2Ó3ðð
ˆó (‰LˆFØ�M‰M˜$ÔØ�O‰O˜DŸK™K›MÐ+;Ô<Ø×Ñ˜VŸ\™\›^¨T¯Z©Z«\Ô:Ø×Ñ˜VŸ]™]›_¨d¯k©k«mÖ<ó	 (r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸    s   € ÷ 
ñ 
 4ñ 
r!   c                óŽ  € V P                  \        V P                  P                  R4      P                  V P                  P                  R4      P                  R4      4       V P                  \        V P                  P                  R4      P                  V P                  P                  R4      P                  R4      4       R# )z…
Verify C{linkTo} fails in the following case:
    - the target is in a directory that doesn't exist
    - the target already exists
rT   s   nosubrS   rU   N)ry   rà   r9   rq   r  r'   s   &r   Útest_linkToErrorsÚFilePathTests.test_linkToErrors  sŠ   € ð 	×ÑÜØ�I‰I�O‰O˜HÓ%×,Ñ,Ø�I‰I�O‰O˜HÓ%×+Ñ+¨HÓ5ô	
ð
 	×ÑÜØ�I‰I�O‰O˜HÓ%×,Ñ,Ø�I‰I�O‰O˜GÓ$×*Ñ*¨8Ó4ö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  $  s   € ÷ ;ñ ;˜dñ ;r!   c                	ó&  € V P                   P                  R 4      P                  R4      pRpV P                  VP                  ! V!  4       VP	                  R4      pVP                  4        VP                  ! V!  pVf   Q hV P                  VP                  4       '       * 4       VP                  R4      pVf   Q hV P                  VP                  4       '       * 4       VP                  4        V P                  VP                  ! V!  4       R# )rV   ó   file3ó   .fooNó   *)r   s   .bars   ext1s   ext2s   ext3)r9   rq   r’   ÚsiblingExtensionSearchÚsiblingExtensionÚtouchr�   r÷   )r(   Úf3ÚextsÚf3eÚfoundÚglobbeds   &     r   ÚtestMultiExtÚFilePathTests.testMultiExt$  sß   € Ø�Y‰Y�_‰_˜WÓ%×+Ñ+¨HÓ5ˆØ:ˆØ×Ñ˜×2Ò2°DÑ9Ô:Ø×!Ñ! 'Ó*ˆØ�	‰	ŒØ×)Ò)¨4Ñ0ˆØÒ Ð Ð Ø×Ñ˜UŸ\™\›^Ô+Ô,Ø×+Ñ+¨DÓ1ˆØÒ"Ð"Ð"Ø×Ñ˜WŸ^™^Ó-Ô-Ô.Ø�
‰
ŒØ×Ñ˜×2Ò2°DÑ9Ö:r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  3  s   € ÷ Qñ Q $ñ Qr!   c                	óª   € \         P                  ! R 4      pVP                  R4       V P                  \         P                  VP                  R4       R# )ó   .s   foo/barõ   /monâ‚¬yN)r   r_   ÚpreauthChildry   ÚInsecurePathrï   s   & r   ÚtestPreauthChildÚFilePathTests.testPreauthChild3  s:   € Ü×Ò˜tÓ$ˆØ
�‰˜
Ô#Ø×Ñœ(×/Ñ/°·±À-ÖPr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  8  s   € ÷ %ñ %˜tñ %r!   c                	ón  € V P                   P                  R 4      pVP                  4        V P                  VP	                  4       ^ 4       V P                  \        VP                  4       \        P                  ! 4       ,
          4      ^,          ^ 4       V P                  \        VP                  4       \        P                  ! 4       ,
          4      ^,          ^ 4       V P                  \        VP                  4       \        P                  ! 4       ,
          4      ^,          ^ 4       V P                  VP                  4       4       V P                  VP                  4       4       \        P                  ! VP                   4       V P                  VP                  4       4       VP                  RR7       V P                  VP                  4       4       V P                  VP!                  4       4       V P                  VP#                  4       4       V P                  VP%                  4       4       R# )s   stattestF)ÚreraiseN)r9   rq   r$  rp   ÚgetsizeÚabsr×   rY   rØ   rÕ   rf   r�   r8   r÷   Úrestatr’   r”   r‘   r“   rÐ   s   & r   ÚtestStatCacheÚFilePathTests.testStatCache8  sX  € Ø�I‰I�O‰O˜KÓ(ˆØ	�‰Œ	Ø×Ñ˜Ÿ™› aÔ(Ø×Ñœ˜QŸZ™Z›\¬D¯IªI«KÕ7Ó8¸BÕ>ÀÔBØ×Ñœ˜QŸZ™Z›\¬D¯IªI«KÕ7Ó8¸BÕ>ÀÔBØ×Ñœ˜QŸZ™Z›\¬D¯IªI«KÕ7Ó8¸BÕ>ÀÔBØ�‰˜Ÿ™›
Ô#Ø�‰˜Ÿ™›
Ô#ä
�	Š	�!—&‘&Ôà�‰˜Ÿ™›
Ô#Ø	�‰˜ˆÔØ×Ñ˜Ÿ™›Ô$Ø×Ñ˜Ÿ™›Ô$Ø×Ñ˜Ÿ™›Ô#Ø×Ñ˜Ÿ™›Ö$r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  K  s   € ÷ 7ñ 7˜Tñ 7r!   c                	ó.  € \         P                  ! \         P                  ! V P                  4      4      pV P	                  V P                  P
                  VP
                  4       V P	                  V P                  P                  VP                  4       R # r7   )ÚpickleÚloadsÚdumpsr9   rp   Ú	__class__)r(   Únewpaths   & r   ÚtestPersistÚFilePathTests.testPersistK  sY   € Ü—,’,œvŸ|š|¨D¯I©IÓ6Ó7ˆØ×Ñ˜Ÿ™×,Ñ,¨g×.?Ñ.?Ô@Ø×Ñ˜Ÿ™Ÿ™¨¯©Ö6r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  P  s   € ÷ Lñ L $ñ Lr!   c                	óD  € V P                  \        P                  V P                  P                  R 4       V P                  \        P                  V P                  P                  R4       V P                  \        P                  V P                  P                  R4       R# )s   ..s   /etcs   ../..N©ry   r   r1  r9   rq   r'   s   &r   ÚtestInsecureUNIXÚFilePathTests.testInsecureUNIXP  sb   € Ø×Ñœ(×/Ñ/°·±·±À%ÔHØ×Ñœ(×/Ñ/°·±·±À'ÔJØ×Ñœ(×/Ñ/°·±·±À(ÖKr!   râ   zTest will run only on Windows.c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  V  s   € ÷ Sñ S 4ñ Sr!   c                	óÚ   € V P                  \        P                  V P                  P                  R 4       V P                  \        P                  V P                  P                  R4       R# )s   ..\..s   C:randomfileNrG  r'   s   &r   ÚtestInsecureWin32ÚFilePathTests.testInsecureWin32U  sB   € à×Ñœ(×/Ñ/°·±·±À)ÔLØ×Ñœ(×/Ñ/°·±·±À/ÖRr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  [  s   € ÷ 	Mñ 	M¨ñ 	Mr!   c                óD  € V P                  \        P                  V P                  P                  R4       V P                  \        P                  V P                  P                  R4       V P                  \        P                  V P                  P                  R4       R# )zâ
Windows has 'special' filenames like NUL and CON and COM1 and LPR
and PRN and ... god knows what else.  They can be located anywhere in
the filesystem.  For obvious reasons, we do not wish to normally permit
access to these.
s   CONs   C:CONzC:\CONNrG  r'   s   &r   ÚtestInsecureWin32WhackyÚ%FilePathTests.testInsecureWin32WhackyZ  sd   € ð 	×Ñœ(×/Ñ/°·±·±À&ÔIØ×Ñœ(×/Ñ/°·±·±À(ÔKØ×Ñœ(×/Ñ/°·±·±À)ÖLr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  f  s   € ÷ Mñ M ñ Mr!   c                	ó²  € V P                  \        P                  ! R 4      \        P                  ! R 4      4       V P                  \        P                  ! R4      \        P                  ! R 4      8„  4       V P                  \        P                  ! R4      \        P                  ! R 4      8¬  4       V P                  \        P                  ! R 4      \        P                  ! R 4      8¬  4       V P                  \        P                  ! R 4      \        P                  ! R 4      8*  4       V P                  \        P                  ! R 4      \        P                  ! R4      8  4       V P                  \        P                  ! R 4      \        P                  ! R4      8*  4       V P                  \        P                  ! R 4      \        P                  ! R4      8g  4       V P                  \        P                  ! R4      \        P                  ! R 4      8g  4       V P	                  \        P                  ! R4      \        P                  ! R4      8g  4       R# )rl   ó   zN)rp   r   r_   rf   r’   r'   s   &r   ÚtestComparisonÚFilePathTests.testComparisonf  s‰  € Ø×Ñœ×*Ò*¨4Ó0´(×2CÒ2CÀDÓ2IÔJØ�‰œ×)Ò)¨$Ó/´(×2CÒ2CÀDÓ2IÑIÔJØ�‰œ×)Ò)¨$Ó/´8×3DÒ3DÀTÓ3JÑJÔKØ�‰œ×)Ò)¨$Ó/´8×3DÒ3DÀTÓ3JÑJÔKØ�‰œ×)Ò)¨$Ó/´8×3DÒ3DÀTÓ3JÑJÔKØ�‰œ×)Ò)¨$Ó/´(×2CÒ2CÀDÓ2IÑIÔJØ�‰œ×)Ò)¨$Ó/´8×3DÒ3DÀTÓ3JÑJÔKØ�‰œ×)Ò)¨$Ó/´8×3DÒ3DÀTÓ3JÑJÔKØ�‰œ×)Ò)¨$Ó/´8×3DÒ3DÀTÓ3JÑJÔKà×Ñœ×*Ò*¨4Ó0´H×4EÒ4EÀdÓ4KÑKÖLr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  s  s   € ÷ 
ñ 
 Tñ 
r!   c                ót   € V P                  \        P                  V P                  P                  RR.4       R# )z\
If C{".."} is in the sequence passed to L{FilePath.descendant},
L{InsecurePath} is raised.
õ   monâ‚¬yz..N)ry   r   r1  r9   r¨   r'   s   &r   Útest_descendantOnlyÚ!FilePathTests.test_descendantOnlys  s.   € ð
 	×ÑÜ×!Ñ! 4§9¡9×#7Ñ#7¸,ÈÐ9Mö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  |  s   € ÷ 0ñ 0˜Tñ 0r!   c                	ól  € V P                   P                  R 4      pVP                  R4      pV P                  VP	                  4       VP	                  4       4       V P                  VP                  4       R4       VP                  4        V P                  W P                   P                  4       4       R# )s   sibling_starts   sibling_testN)	r9   rq   Úsiblingrp   rC   ÚbasenameÚcreateDirectoryr^  rÂ   )r(   r4   Útss   &  r   ÚtestSiblingÚFilePathTests.testSibling|  sz   € Ø�I‰I�O‰OÐ,Ó-ˆØ�Y‰Y�Ó'ˆØ×Ñ˜Ÿ™› q§y¡y£{Ô3Ø×Ñ˜Ÿ™›¨Ô8Ø
×ÑÔØ�‰�bŸ)™)×,Ñ,Ó.Ö/r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  „  s   € ÷ 9ñ 9 dñ 9r!   c                	ó¨  € V P                   P                  4       pV P                  VP                  4       V P                   P                  4       4       V P	                  VP                  4       V P                   P                  4       4       VP                  4        V P                  WP                   P                  4       P                  4       4       R # r7   )r9   ÚtemporarySiblingrp   rC   ÚassertNotInr_  r•   r`  r^  ÚparentrÂ   )r(   ra  s   & r   ÚtestTemporarySiblingÚ"FilePathTests.testTemporarySibling„  sˆ   € Ø�Y‰Y×'Ñ'Ó)ˆØ×Ñ˜Ÿ™› t§y¡y×'8Ñ'8Ó':Ô;Ø×Ñ˜Ÿ™›¨¯	©	×(9Ñ(9Ó(;Ô<Ø
×ÑÔØ�‰�bŸ)™)×*Ñ*Ó,×5Ñ5Ó7Ö8r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ‹  s   € ÷ 

ñ 

°ñ 

r!   c                óÈ   € RpV P                   P                  V4      pV P                  VP                  4       P	                  V4      VP                  4       : RV: 24       R# )z‹
If L{FilePath.temporarySibling} is given an extension argument, it will
produce path objects with that extension appended to their names.
s   .test-extensionz does not end with N)r9   rf  rf   r_  Úendswith)r(   ÚtestExtensionra  s   &  r   Útest_temporarySiblingExtensionÚ,FilePathTests.test_temporarySiblingExtension‹  sT   € ð
 +ˆØ�Y‰Y×'Ñ'¨Ó6ˆØ�‰Ø�K‰K‹M×"Ñ" =Ó1Ø�{‰{‹}ÑÐ2°=Ñ2CÐDö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  —  s   € ÷ -ñ - dñ -r!   c                óŒ   € V P                   P                  4        V P                  V P                   P                  4       4       R# )zf
L{FilePath.remove} on a L{FilePath} that refers to a directory will
recursively delete its contents.
N)r9   r÷   r’   r�   r'   s   &r   Útest_removeDirectoryÚ"FilePathTests.test_removeDirectory—  s/   € ð
 	�	‰	×ÑÔØ×Ñ˜Ÿ™×)Ñ)Ó+Ö,r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸     s   € ÷ 
;ñ 
;¨ñ 
;r!   c                ó’  € V P                   P                  R4      p\        P                  ! V P                   P                  R4      P                   VP                   4       VP	                  4        V P                  VP                  4       4       V P                  V P                   P                  R4      P                  4       4       R# )z`
For a path which is a symbolic link, L{FilePath.remove} just deletes
the link, not the target.
rÃ  rS   N)r9   rq   r8   rÅ  r÷   r’   r�   rf   )r(   r  s   & r   Útest_removeWithSymlinkÚ$FilePathTests.test_removeWithSymlinkŸ  sz   € ð �y‰y�‰˜|Ó,ˆä
�
Š
�4—9‘9—?‘? 7Ó+×0Ñ0°$·)±)Ô<Ø�‰ŒØ×Ñ˜Ÿ™›Ô'Ø�‰˜Ÿ	™	Ÿ™¨Ó0×7Ñ7Ó9Ö:r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ¬  s   € ÷ -ñ - dñ -r!   c                óÜ  € \        V P                  P                  4       4      p\        P                  ! V P                  4       4      pV P                  P                  V4       V P                  P                  4        VP                  V P                  4       \        V P                  P                  4       4      pVP                  4        VP                  4        V P                  W14       R# )zx
L{FilePath.copyTo} makes a copy of all the contents of the directory
named by that L{FilePath} if it is able to do so.
N)
r¯   r9   r   r   r_   r%   ÚcopyTor÷   rø   rp   ©r(   ÚoldPathsrð   ÚnewPathss   &   r   Útest_copyToDirectoryÚ"FilePathTests.test_copyToDirectory¬  s–   € ô
 ˜Ÿ	™	Ÿ™Ó(Ó)ˆÜ×Ò˜tŸ{™{›}Ó-ˆØ�	‰	×Ñ˜ÔØ�	‰	×ÑÔØ
�	‰	�$—)‘)ÔÜ˜Ÿ	™	Ÿ™Ó(Ó)ˆØ�‰ŒØ�‰ŒØ×Ñ˜Ö,r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  »  s   € ÷ /ñ /°4ñ /r!   c                ó
  € V P                   P                  R4      pR Vn        \        V P	                  4       4      pV P                  \        VP                  V4       V P                  VP                  P                  4       R# )zÀ
If an exception is raised while L{FilePath.copyTo} is trying to open
source file to read from, the destination file is closed and the
exception is raised to the caller of L{FilePath.copyTo}.
s   notherec                 ó   € R # )Tr   r   r!   r   Ú<lambda>ÚAFilePathTests.test_copyToMissingDestFileClosing.<locals>.<lambda>Å  s   € ¡r!   N)r9   rq   r“   r=  r%   ry   r  r{  rf   rð   r  )r(   ÚnosuchÚdestinations   &  r   Ú!test_copyToMissingDestFileClosingÚ/FilePathTests.test_copyToMissingDestFileClosing»  s]   € ð —‘—‘ Ó,ˆñ %ˆŒô (¨¯©«Ó6ˆà×Ñœ' 6§=¡=°+Ô>Ø�‰˜Ÿ™×-Ñ-Ö.r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Î  s   € ÷ 
/ñ 
/¨ñ 
/r!   c                ó,  € \        V P                  4       4      p\        \        4      pV P                  \        VP
                  V4       V P                  VP                  P                  4       V P                  VP                  P                  4       R# )zÎ
If an exception is raised while L{FilePath.copyTo} is copying bytes
between two regular files, the source and destination files are closed
and the exception propagates to the caller of L{FilePath.copyTo}.
N)	r=  r%   Ú__file__ry   r  r{  rf   rð   r  )r(   r‡  Úsources   &  r   Útest_copyToFileClosingÚ$FilePathTests.test_copyToFileClosingÎ  s`   € ô (¨¯©«Ó6ˆÜ"¤8Ó,ˆØ×Ñœ' 6§=¡=°+Ô>Ø�‰˜Ÿ	™	×(Ñ(Ô)Ø�‰˜Ÿ™×-Ñ-Ö.r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Ú  s   € ÷ 
ñ 
¨Dñ 
r!   c                óš   € V P                  \        \        3V P                  P                  V P                  P                  R4      4       R# )z¸
L{FilePath.copyTo} fails with an OSError or IOError (depending on
platform, as it propagates errors from open() and write()) when
attempting to copy a directory to a child of itself.
rT   N)ry   rà   r  r9   r{  rq   r'   s   &r   Útest_copyToDirectoryItselfÚ(FilePathTests.test_copyToDirectoryItselfÚ  ó5   € ð 	×ÑÜ”gÐ §	¡	× 0Ñ 0°$·)±)·/±/À(Ó2Kö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  å  s   € ÷ 
ñ 
¨ñ 
r!   c                óº  € \         P                  ! V P                  P                  R4      P                  V P                  P                  R4      P                  4       \        P
                  ! V P                  4       4      pV P                  P                  V4       V P                  VP                  R4      P                  4       4       T P                  VP                  R4      P                  4        Uu. uF  q"P                  4       NK  	  upVP                  R4      P                  4        Uu. uF  q"P                  4       NK  	  up4       R# u upi u upi )zV
Verify that copying with followLinks=True copies symlink targets
instead of symlinks
rS   rÏ  N)r8   rÅ  r9   rq   r   r_   r%   r{  r’   r”   rp   rÂ   r_  )r(   rð   r?   s   &  r   Útest_copyToWithSymlinkÚ$FilePathTests.test_copyToWithSymlinkä  sè   € ô 	�
Š
�4—9‘9—?‘? 7Ó+×0Ñ0°$·)±)·/±/À(Ó2K×2PÑ2PÔQÜ×Ò˜tŸ{™{›}Ó-ˆØ�	‰	×Ñ˜ÔØ×Ñ˜Ÿ™ (Ó+×2Ñ2Ó4Ô5Ø×ÑØ#%§8¡8¨GÓ#4×#=Ñ#=Ô#?Ó@Ñ#?˜a�Z‰ZŽ\Ñ#?Ñ@Ø#%§8¡8¨HÓ#5×#>Ñ#>Ô#@ÓAÑ#@˜a�Z‰ZŽ\Ñ#@ÑAö	
ùÚ@ùÚAs   Ã7EÄ2E
c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ô  s   € ÷ 
ñ 
¨4ñ 
r!   c                óD  € \         P                  ! RV P                  P                  R4      P                  4       \        P
                  ! V P                  4       4      pV P                  P                  VRR7       V P                  VP                  R4      P                  4       4       V P                  \         P                  ! V P                  P                  R4      P                  4      \         P                  ! VP                  R4      P                  4      4       R# )zH
Verify that copying with followLinks=False copies symlinks as symlinks
rS   rÏ  F©ÚfollowLinksN)r8   rÅ  r9   rq   r   r_   r%   r{  rf   r”   rp   Úreadlinkrï   s   & r   Útest_copyToWithoutSymlinkÚ'FilePathTests.test_copyToWithoutSymlinkó  s¸   € ô
 	�
Š
�7˜DŸI™IŸO™O¨HÓ5×:Ñ:Ô;Ü×Ò˜tŸ{™{›}Ó-ˆØ�	‰	×Ñ˜¨ÐÔ/Ø�‰˜Ÿ™ Ó*×1Ñ1Ó3Ô4Ø×ÑÜ�KŠK˜Ÿ	™	Ÿ™¨Ó1×6Ñ6Ó7Ü�KŠK˜Ÿ™ Ó*×/Ñ/Ó0ö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸    s   € ÷ 2ñ 2¨$ñ 2r!   c                óä   € \         P                  ! V P                  4       4      pV P                  \        VP
                  R4      pV P                  VP                  \        P                  4       R# )zF
If the source path is missing, L{FilePath.copyTo} raises L{OSError}.
s   some other pathN)	r   r_   r%   ry   rà   r{  rp   ÚerrnoÚENOENT)r(   r9   Úexcs   &  r   Útest_copyToMissingSourceÚ&FilePathTests.test_copyToMissingSource  sK   € ô × Ò  §¡£Ó/ˆØ×Ñ¤¨¯©Ð6HÓIˆØ×Ñ˜Ÿ™¤E§L¡LÖ1r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  	  s   € ÷ -ñ -˜Tñ -r!   c                ó¨  € \        V P                  P                  4       4      p\        P                  ! V P                  4       4      pV P                  P                  V4       VP                  V P                  4       \        V P                  P                  4       4      pVP                  4        VP                  4        V P                  W14       R# )z^
Verify that moving an entire directory results into another directory
with the same content.
N)	r¯   r9   r   r   r_   r%   ÚmoveTorø   rp   r|  s   &   r   Útest_moveToÚFilePathTests.test_moveTo	  s†   € ô
 ˜Ÿ	™	Ÿ™Ó(Ó)ˆÜ×Ò˜tŸ{™{›}Ó-ˆØ�	‰	×Ñ˜ÔØ
�	‰	�$—)‘)ÔÜ˜Ÿ	™	Ÿ™Ó(Ó)ˆØ�‰ŒØ�‰ŒØ×Ñ˜Ö,r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸    s   € ÷ &ñ &¨ñ &r!   c                óÐ  € \         P                  ! V P                  4       4      p\         P                  ! V P                  4       4      pVP                  4        V P	                  VP                  4       4       V P                  VP                  4       4       VP                  V4       V P                  VP                  4       4       V P	                  VP                  4       4       R# )zÂ
A L{FilePath} that has been moved aside with L{FilePath.moveTo} no
longer registers as existing.  Its previously non-existent target
exists, though, as it was created by the call to C{moveTo}.
N)r   r_   r%   r$  rf   r�   r’   r©  )r(   rð   Úfp2s   &  r   Útest_moveToExistsCacheÚ$FilePathTests.test_moveToExistsCache  s’   € ô ×Ò˜tŸ{™{›}Ó-ˆÜ×Ò §¡£Ó.ˆØ
�‰Œ
ð
 	�‰˜Ÿ	™	›Ô$Ø×Ñ˜Ÿ™›Ô&à
�	‰	�#ŒØ×Ñ˜Ÿ™›Ô%Ø�‰˜Ÿ
™
›Ö%r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  +  s   € ÷ &ñ &°$ñ &r!   c                óF   € V P                  4        V P                  4        R# )zX
The assertion of test_moveToExistsCache should hold in the case of a
cross-mount move.
N)ÚsetUpFaultyRenamer¯  r'   s   &r   Ú test_moveToExistsCacheCrossMountÚ.FilePathTests.test_moveToExistsCacheCrossMount+  s   € ð
 	×ÑÔ Ø×#Ñ#Ö%r!   c                 	ó   € R # r7   r   r   r!   r   r„  ÚFilePathTests.<lambda>3  s   € Ádr!   c               ó    € V ^8„  d   QhRRRR/# )r   ÚhookzCallable[[], None]r   rD   r   )r   s   "r   r   r¸  3  s   € ÷ +ñ +Ð);ð +Ètñ +r!   c                óJ  € \         P                  ! V P                  4       4      p\         P                  ! V P                  4       4      pVP                  R4       VP                  R4       V! 4        V P	                  VP                  4       ^4       V P	                  VP                  4       ^
4       \        P                  ! VP                  4       V P	                  VP                  4       ^
4       VP                  V4       V P	                  VP                  4       ^4       R# )aÃ  
L{FilePath.moveTo} clears its destination's status cache, such that
calls to L{FilePath.getsize} after the call to C{moveTo} will report the
new size, not the old one.

This is a separate test from C{test_moveToExistsCache} because it is
intended to cover the fact that the destination's cache is dropped;
test_moveToExistsCache doesn't cover this case because (currently) a
file that doesn't exist yet does not cache the fact of its non-
existence.
s   1234s
   1234567890N)
r   r_   r%   r   rp   r7  r8   r÷   r9   r©  )r(   r¹  rð   r®  s   &&  r   Útest_moveToSizeCacheÚ"FilePathTests.test_moveToSizeCache3  sÄ   € ô ×Ò˜tŸ{™{›}Ó-ˆÜ×Ò §¡£Ó.ˆØ
�‰�gÔØ�‰�}Ô%ÙŒð 	×Ñ˜Ÿ™› qÔ)Ø×Ñ˜Ÿ™›¨Ô+ô 	�	Š	�#—(‘(Ôà×Ñ˜Ÿ™›¨Ô+à
�	‰	�#ŒØ×Ñ˜Ÿ™›¨Ö*r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  R  s   € ÷ 	.ñ 	.°ñ 	.r!   c                ó>   a € R V 3R llpS P                  VR7       R# )zV
The assertion of test_moveToSizeCache should hold in the case of a
cross-mount move.
c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   ÚBFilePathTests.test_moveToSizeCacheCrossMount.<locals>.__annotate__X  s   € ÷ 	%ñ 	%�tñ 	%r!   c                 ó(   <€ S P                  4        R # r7   )r³  r'   s   €r   rb   Ú;FilePathTests.test_moveToSizeCacheCrossMount.<locals>.setUpX  s   ø€ Ø×"Ñ"Ö$r!   )r¹  N)r»  )r(   rb   s   f r   Útest_moveToSizeCacheCrossMountÚ,FilePathTests.test_moveToSizeCacheCrossMountR  s    ø€ ÷	%ð 	%ð 	×!Ñ! uÐ!Ö-r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ]  s   € ÷ 
ñ 
 $ñ 
r!   c                óš   € V P                  \        \        3V P                  P                  V P                  P                  R4      4       R# )zÂ
Verify error behavior of moveTo: it should raises one of OSError or
IOError if you want to move a path into one of its child. It's simply
the error raised by the underlying rename system call.
rT   N)ry   rà   r  r9   r©  rq   r'   s   &r   Útest_moveToErrorÚFilePathTests.test_moveToError]  r”  r!   c               ó   € V ^8„  d   QhRR/# )r   r   zList[Tuple[str, str]]r   )r   s   "r   r   r¸  g  s   € ÷ ñ Ð#8ñ r!   c                óp   aa€ . oR VV3R llp\         P                  oV P                  \         RV4       S# )zÛ
Set up a C{os.rename} that will fail with L{errno.EXDEV} on first call.
This is used to simulate a cross-device rename failure.

@return: a list of pair (src, dest) of calls to C{os.rename}
@rtype: C{list} of C{tuple}
c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úsrcr_  Údestr   rD   r   )r   s   "r   r   Ú5FilePathTests.setUpFaultyRename.<locals>.__annotate__q  s!   € ÷ 	-ñ 	-˜cð 	-¨ð 	-°ñ 	-r!   c                óŒ   <€ SP                  W34       \        S4      ^8X  d   \        \        P                  R4      hS! W4      # )é   z;Test-induced failure simulating cross-device rename failure)r>   r³   rà   r¢  ÚEXDEV)rÌ  rÍ  ÚinvokedWithÚoriginalRenames   &&€€r   ÚfaultyRenameÚ5FilePathTests.setUpFaultyRename.<locals>.faultyRenameq  sD   ø€ Ø×Ñ ˜{Ô+Ü�;Ó 1Ô$ÜÜ—K‘KØTóð ñ " #Ó,Ð,r!   Úrename)r8   rÖ  Úpatch)r(   rÔ  rÒ  rÓ  s   & @@r   r³  ÚFilePathTests.setUpFaultyRenameg  s5   ù€ ð ˆ÷	-ñ 	-ô Ÿ™ˆØ�
‰
”2�x Ô.ØÐr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ~  s   € ÷ %ñ % tñ %r!   c                óh   € V P                  4       pV P                  4        V P                  V4       R# )zˆ
C{moveTo} should be able to handle C{EXDEV} error raised by
C{os.rename} when trying to move a file on a different mounted
filesystem.
N)r³  rª  rf   )r(   rÒ  s   & r   Útest_crossMountMoveToÚ#FilePathTests.test_crossMountMoveTo~  s.   € ð ×,Ñ,Ó.ˆð 	×ÑÔð 	�‰˜Ö$r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Ž  s   € ÷ %ñ %°$ñ %r!   c                óÜ  € V P                  4       pV P                  P                  R4      pV P                  P                  R4      p\        P                  ! V P                  P                  R4      P                  VP                  4       VP                  V4       V P                  VP                  4       4       V P                  VP                  4       R4       V P                  V4       R# )zp
By default, when moving a symlink, it should follow the link and
actually copy the content of the linked node.
rU   r  rT   r2   N)r³  r9   rq   r8   rÅ  r©  r’   r”   rp   r  rf   ©r(   rÒ  r£   r%  s   &   r   Ú test_crossMountMoveToWithSymlinkÚ.FilePathTests.test_crossMountMoveToWithSymlink�  sœ   € ð ×,Ñ,Ó.ˆØ�Y‰Y�_‰_˜XÓ&ˆØ�Y‰Y�_‰_˜XÓ&ˆÜ
�
Š
�4—9‘9—?‘? 8Ó,×1Ñ1°2·7±7Ô;Ø
�	‰	�"ŒØ×Ñ˜Ÿ™›Ô%Ø×Ñ˜Ÿ™›¨)Ô4Ø�‰˜Ö$r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  �  s   € ÷ %ñ %°Tñ %r!   c                óà  € V P                  4       pV P                  P                  R4      pV P                  P                  R4      p\        P                  ! V P                  P                  R4      P                  VP                  4       VP                  VRR7       V P                  VP                  4       4       V P                  VP                  4       R4       V P                  V4       R# )zS
Verify that moveTo called with followLinks=False actually create
another symlink.
rU   r  rT   Fr›  r2   N)
r³  r9   rq   r8   rÅ  r©  rf   r”   rp   r  rß  s   &   r   Ú#test_crossMountMoveToWithoutSymlinkÚ1FilePathTests.test_crossMountMoveToWithoutSymlinkœ  sŸ   € ð ×,Ñ,Ó.ˆØ�Y‰Y�_‰_˜XÓ&ˆØ�Y‰Y�_‰_˜XÓ&ˆÜ
�
Š
�4—9‘9—?‘? 8Ó,×1Ñ1°2·7±7Ô;Ø
�	‰	�" %ˆ	Ô(Ø�‰˜Ÿ	™	›Ô$Ø×Ñ˜Ÿ™›¨)Ô4Ø�‰˜Ö$r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  «  s   € ÷ *ñ * tñ *r!   c                óÊ  € \         P                  ! V P                  4       4      pVP                  4       ;_uu_ 4       pV P	                  RVP
                  4       VP                  R4       RRR4       \        VP                  R4      ;_uu_ 4       pVP                  4       pV P                  VR4       RRR4       R#   + '       g   i     L[; i  + '       g   i     R# ; i)a  
L{FilePath.create} should always open (and write to) files in binary
mode; line-feed octets should be unmodified.

(While this test should pass on all platforms, it is only really
interesting on platforms which have the concept of binary mode, i.e.
Windows platforms.)
Úbó   
NÚrb)r   r_   r%   Úcreater^  r,  r[   rM   r9   r¡   rp   )r(   r9   ra   rð   r¡   s   &    r   Útest_createBinaryModeÚ#FilePathTests.test_createBinaryMode«  s•   € ô × Ò  §¡£Ó/ˆØ�[‰[�]Œ]˜aØ�M‰M˜#˜qŸv™vÔ&Ø�G‰G�EŒN÷ ô �$—)‘)˜T×"Ô" bØ—7‘7“9ˆDØ×Ñ˜T 5Ô)÷ #Ñ"÷ �]ú÷ #×"Ð"ús   ½.B>Â#CÂ>C	ÃC"	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ¼  s   € ÷ L=ñ L=˜$ñ L=r!   c                	ó¼	  € V P                   P                  R 4      pV P                  \        VP                  4      pV P                  VP                  \        P                  4       V P                   P                  R4      pVP	                  R4      ;_uu_ 4       pVP                  R4       RRR4       VP	                  4       ;_uu_ 4       pV P                  VP                  4       R4       RRR4       VP	                  R4      P                  4        VP	                  4       ;_uu_ 4       pV P                  VP                  4       R4       RRR4       V P                   P                  R4      pVP	                  R4      ;_uu_ 4       pVP                  R4       RRR4       VP	                  R4      ;_uu_ 4       pVP                  R	4       RRR4       VP	                  R
4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       VP	                  R4      ;_uu_ 4       pV P                  VP                  4       R4       VP                  ^ ^4       VP                  R4       RRR4       VP	                  R
4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       VP	                  R4      ;_uu_ 4       pV P                  VP                  4       R4       VP                  ^ ^4       VP                  R4       RRR4       VP	                  R4      ;_uu_ 4       pVP                  R4       VP                  ^ ^4       V P                  VP                  4       R4       VP                  ^ ^ 4       V P                  VP                  4       R4       RRR4       VP                  R4       VP	                  R4      P                  4        Tp?V P                  \        \        3VP                  4       R#   + '       g   i     ELs; i  + '       g   i     ELF; i  + '       g   i     ELú; i  + '       g   i     ELÀ; i  + '       g   i     EL¡; i  + '       g   i     ELs; i  + '       g   i     EL"; i  + '       g   i     ELô; i  + '       g   i     EL£; i  + '       g   i     EL ; i)s   nonexistents   writerrj  ó   abc
defNr!   s   appenders   abcÚas   defr:  s   abcdefzr+s   ghis	   abcdefghizw+s   123za+s   456s   123456T)r9   rq   ry   r  rM   rp   r¢  r£  r[   r¡   r^   ÚseekÚrequireCreaterà   )r(   ÚnonexistentÚeÚwriterra   ÚappenderÚexistents   &      r   ÚtestOpenÚFilePathTests.testOpen¼  sM  € à—i‘i—o‘o nÓ5ˆØ×Ñœg {×'7Ñ'7Ó8ˆØ×Ñ˜Ÿ™¤%§,¡,Ô/ð —‘—‘ Ó+ˆØ�[‰[˜×Ô Ø�G‰G�KÔ ÷ ð
 �[‰[�]Œ]˜aØ×Ñ˜QŸV™V›X {Ô3÷ ð 	�‰�CÓ×ÑÔ Ø�[‰[�]Œ]˜aØ×Ñ˜QŸV™V›X sÔ+÷ ð
 —9‘9—?‘? ;Ó/ˆØ�]‰]˜3×Ô 1Ø�G‰G�FŒO÷  ð �]‰]˜3×Ô 1Ø�G‰G�FŒO÷  ð �]‰]˜3×Ô 1Ø×Ñ˜QŸV™V›X yÔ1÷  ð �]‰]˜4× Ô  AØ×Ñ˜QŸV™V›X yÔ1ð �F‰F�1�aŒLà�G‰G�FŒO÷ !ð �]‰]˜3×Ô 1Ø×Ñ˜QŸV™V›X |Ô4÷  ð
 �]‰]˜4× Ô  AØ×Ñ˜QŸV™V›X sÔ+Ø�F‰F�1�aŒLØ�G‰G�FŒO÷ !ð �]‰]˜4× Ô  Að
 �G‰G�FŒOØ�F‰F�1�aŒLØ×Ñ˜QŸV™V›X sÔ+à�F‰F�1�aŒLØ×Ñ˜QŸV™V›X yÔ1÷ !ð 	×!Ñ! $Ô'Ø×Ñ˜Ó×#Ñ#Ô%ØˆØØ×Ñœ7¤GÐ,¨h¯m©mÖ<÷I ×Ðú÷
 �]ˆ]ú÷
 �]ˆ]ú÷  ×Ðú÷  ×Ðú÷  ×Ðú÷ !× Ð ú÷  ×Ðú÷
 !× Ð ú÷ !× Ð ús{   ÂPÃ!P*Ä,!P>Æ	QÆ<Q&Ç/!Q:È1ARÊ!R"ËAR6Ì=A6S
ÐP'	Ð*P;	Ð>Q	ÑQ#	Ñ&Q7	Ñ:R	ÒR	Ò"R3	Ò6S	Ó
S	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  
  s   € ÷ 'ñ '°ñ 'r!   c                ó  € V P                   P                  R4      pVP                  R4      pV;_uu_ 4       pVP                  R4       RRR4       V P	                  VP
                  4       R#   + '       g   i     L-; i)a:  
Due to a bug in Python 2.7 on Windows including multiple 'b'
characters in the mode passed to the built-in open() will cause an
error.  FilePath.open() ensures that only a single 'b' character is
included in the mode passed to the built-in open().

See http://bugs.python.org/issue7686 for details about the bug.
s   explicit-binaryrL   rð  N©r9   rq   rM   r[   rf   r�   ©r(   rö  ÚopenerÚfiles   &   r   Útest_openWithExplicitBinaryModeÚ-FilePathTests.test_openWithExplicitBinaryMode
  sU   € ð —‘—‘Ð!3Ó4ˆØ—‘˜TÓ"ˆß‰V�tØ�J‰J�{Ô#÷ à�‰˜Ÿ™Ö&÷ �Vúó   ·A.Á.A>	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸    s   € ÷ 'ñ '¸4ñ 'r!   c                ó  € V P                   P                  R4      pVP                  R4      pV;_uu_ 4       pVP                  R4       RRR4       V P	                  VP
                  4       R#   + '       g   i     L-; i)af  
Due to a bug in Python 2.7 on Windows including multiple 'b'
characters in the mode passed to the built-in open() will cause an
error.  No matter how many 'b' modes are specified, FilePath.open()
ensures that only a single 'b' character is included in the mode
passed to the built-in open().

See http://bugs.python.org/issue7686 for details about the bug.
s   multiple-binaryÚwbbrð  Nrý  rþ  s   &   r   Ú)test_openWithRedundantExplicitBinaryModesÚ7FilePathTests.test_openWithRedundantExplicitBinaryModes  sU   € ð —‘—‘Ð!3Ó4ˆØ—‘˜UÓ#ˆß‰V�tØ�J‰J�{Ô#÷ à�‰˜Ÿ™Ö&÷ �Vúr  c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  )  s   € ÷ 	%ñ 	% $ñ 	%r!   c                óê   € \         P                  ! V P                  4       4      pV P                  VP	                  4       4       VP                  4        V P                  VP	                  4       4       R# )zs
Check that C{filepath.FilePath.exists} correctly restat the object if
an operation has occurred in the mean time.
N)r   r_   r%   r’   r�   Úmakedirsrf   rï   s   & r   Útest_existsCacheÚFilePathTests.test_existsCache)  sI   € ô
 ×Ò˜tŸ{™{›}Ó-ˆØ×Ñ˜Ÿ™›Ô%à
�‰ŒØ�‰˜Ÿ	™	›Ö$r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  4  s   € ÷ $ñ $¸$ñ $r!   c                óh  € \         P                  ! \        P                  P	                  V P                  4       RRR4      4      pV P                  VP                  4       4       VP                  4        V P                  VP                  4       4       V P                  VP                  4       4       R# )z…
C{FilePath.makedirs} creates a directory at C{path}}, including
recursively creating all parent directories leading up to the path.
s   foos   bars   bazN)r   r_   r8   r9   r;   r%   r’   r�   r  rf   r‘   rï   s   & r   Ú(test_makedirsMakesDirectoriesRecursivelyÚ6FilePathTests.test_makedirsMakesDirectoriesRecursively4  sn   € ô
 ×ÒœrŸw™wŸ|™|¨D¯K©K«M¸6À6È6ÓRÓSˆØ×Ñ˜Ÿ™›Ô%à
�‰Œà�‰˜Ÿ	™	›Ô$Ø�‰˜Ÿ™›
Ö#r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  A  s   € ÷ $ñ $È$ñ $r!   c                ó,  € \         P                  ! V P                  4       4      pV P                  VP	                  4       4       VP                  RR7       V P                  VP	                  4       4       V P                  VP                  4       4       R# )zx
Calling C{FilePath.makedirs} with C{ignoreExistingDirectory} set to
C{True} has no effect if directory does not exist.
T©ÚignoreExistingDirectoryN)r   r_   r%   r’   r�   r  rf   r‘   rï   s   & r   Ú8test_makedirsMakesDirectoriesWithIgnoreExistingDirectoryÚFFilePathTests.test_makedirsMakesDirectoriesWithIgnoreExistingDirectoryA  s`   € ô
 ×Ò˜tŸ{™{›}Ó-ˆØ×Ñ˜Ÿ™›Ô%à
�‰¨DˆÔ1à�‰˜Ÿ	™	›Ô$Ø�‰˜Ÿ™›
Ö#r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  N  s   € ÷ 
8ñ 
8¸$ñ 
8r!   c                ó<  € \         P                  ! \        P                  P	                  V P                  4       4      4      pVP                  4        V P                  \        VP                  4      pV P                  VP                  \        P                  4       R# )ze
C{FilePath.makedirs} throws an C{OSError} exception
when called on a directory that already exists.
N)r   r_   r8   r9   r;   r%   r  ry   rà   rp   r¢  ÚEEXIST©r(   rð   r`  s   &  r   Ú(test_makedirsThrowsWithExistentDirectoryÚ6FilePathTests.test_makedirsThrowsWithExistentDirectoryN  s^   € ô
 ×ÒœrŸw™wŸ|™|¨D¯K©K«MÓ:Ó;ˆØ
�‰Œà×%Ñ%¤g¨r¯{©{Ó;ˆ	à×Ñ˜Ÿ™¬%¯,©,Ö7r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Z  s   € ÷ %ñ %¸Tñ %r!   c                ó  € \         P                  ! V P                  4       4      pVP                  4        V P	                  VP                  4       4       VP                  RR7       V P	                  VP                  4       4       R# )z�
C{FilePath.makedirs} succeeds when called on a directory that already
exists and the c{ignoreExistingDirectory} argument is set to C{True}.
Tr  N)r   r_   r%   r  rf   r�   rï   s   & r   Ú+test_makedirsAcceptsIgnoreExistingDirectoryÚ9FilePathTests.test_makedirsAcceptsIgnoreExistingDirectoryZ  sU   € ô
 ×Ò˜tŸ{™{›}Ó-ˆØ
�‰ŒØ�‰˜Ÿ	™	›Ô$à
�‰¨DˆÔ1à�‰˜Ÿ	™	›Ö$r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  g  s   € ÷ 8ñ 8Àtñ 8r!   c                óD  € \         P                  ! V P                  4       4      pVP                  4        V P	                  VP                  4       4       V P                  \        VP                  RR7      pV P                  VP                  \        P                  4       R# )zŠ
When C{FilePath.makedirs} is called with C{ignoreExistingDirectory} set
to C{True} it throws an C{OSError} exceptions if path is a file.
Tr  N)r   r_   r%   rë  rf   r“   ry   rà   r  rp   r¢  r  r  s   &  r   Ú5test_makedirsIgnoreExistingDirectoryExistAlreadyAFileÚCFilePathTests.test_makedirsIgnoreExistingDirectoryExistAlreadyAFileg  so   € ô
 ×Ò˜tŸ{™{›}Ó-ˆØ
�	‰	ŒØ�‰˜Ÿ	™	›Ô$à×%Ñ%Ü�R—[‘[¸$ð &ó 
ˆ	ð 	×Ñ˜Ÿ™¬%¯,©,Ö7r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  v  s   € ÷ 8ñ 8È4ñ 8r!   c                ó   € R R lpV P                  \        RV4       \        P                  ! V P	                  4       4      pV P                  \        VP                  RR7      pV P                  VP                  \        P                  4       R# )z˜
When C{FilePath.makedirs} is called with C{ignoreExistingDirectory} set
to C{True} it raises an C{OSError} exception if exception errno is not
EEXIST.
c               ó    € V ^8„  d   QhRRRR/# )r   r9   r_  r   rD   r   )r   s   "r   r   Ú]FilePathTests.test_makedirsRaisesNonEexistErrorsIgnoreExistingDirectory.<locals>.__annotate__}  s   € ÷ 	=ñ 	= ð 	=¨ñ 	=r!   c                ó6   € \        \        P                  R 4      h)zPermission Denied)rà   r¢  ÚEACCESrë  s   &r   ÚfaultyMakedirsÚ_FilePathTests.test_makedirsRaisesNonEexistErrorsIgnoreExistingDirectory.<locals>.faultyMakedirs}  s   € Üœ%Ÿ,™,Ð(;Ó<Ð<r!   r  Tr  N)r×  r8   r   r_   r%   ry   rà   r  rp   r¢  r+  )r(   r,  rð   r`  s   &   r   Ú9test_makedirsRaisesNonEexistErrorsIgnoreExistingDirectoryÚGFilePathTests.test_makedirsRaisesNonEexistErrorsIgnoreExistingDirectoryv  si   € õ	=ð 	�
‰
”2�z >Ô2Ü×Ò˜tŸ{™{›}Ó-ˆà×%Ñ%Ü�R—[‘[¸$ð &ó 
ˆ	ð 	×Ñ˜Ÿ™¬%¯,©,Ö7r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ‰  s   € ÷ *ñ *˜dñ *r!   c                óæ  € \         P                  ! V P                  4       4      pVP                  R4       V P	                  VP                  4       ^4       \        VP                  R4      ;_uu_ 4       pVP                  R4       RRR4       V P	                  VP                  4       ^4       VP                  4        V P	                  VP                  4       ^4       R#   + '       g   i     Lb; i)zÃ
L{FilePath.changed} indicates that the L{FilePath} has changed, but does
not re-read the status information from the filesystem until it is
queried again via another method, such as C{getsize}.
s   12345rL   s   12345678N)
r   r_   r%   r   rp   r7  rM   r9   r[   Úchanged)r(   rð   ÚfObjs   &  r   Útest_changedÚFilePathTests.test_changed‰  s¤   € ô ×Ò˜tŸ{™{›}Ó-ˆØ
�‰�hÔØ×Ñ˜Ÿ™› qÔ)ô �"—'‘'˜4× Ô  DØ�J‰J�{Ô#÷ !ð 	×Ñ˜Ÿ™› qÔ)Ø
�
‰
Œð 	×Ñ˜Ÿ™› qÖ)÷ !× ús   Á4C Ã C0	zTest does not run on Windowsc               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸     s   € ÷ 
ñ 
¨4ñ 
r!   c                óè  € R Fz  pV P                   P                  R4      P                  V4       V P                  V P                   P                  R4      P	                  4       \
        P                  ! V4      4       K|  	  V P                   P                  R4      P                  R4       V P                  V P                   P                  R4      P	                  4       P                  4       R4       R# )z–
Getting permissions for a file returns a L{Permissions} object for
POSIX platforms (which supports separate user, group, and other
permissions bits.
rS   éô  z	rwxrw-r--N)rœ  r¬  )r9   rq   r»  rp   ÚgetPermissionsr   r¡  r}  r¾  s   & r   Útest_getPermissions_POSIXÚ'FilePathTests.test_getPermissions_POSIXŸ  s­   € ó #ˆDØ�I‰I�O‰O˜GÓ$×*Ñ*¨4Ô0Ø×ÑØ—	‘	—‘ Ó(×7Ñ7Ó9¼8×;OÒ;OÐPTÓ;Uöñ #ð
 	�	‰	�‰˜Ó ×&Ñ& uÔ-Ø×ÑØ�I‰I�O‰O˜GÓ$×3Ñ3Ó5×?Ñ?ÓAÀ;ö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  °  s   € ÷ *ñ *¨Dñ *r!   c                óª   € \         P                  ! V P                  4       4       V P                  V P                  .4      pV P                  V. 4       R# )zi
While accessing L{twisted.python.filepath.FilePath.statinfo} is
deprecated, the filepath itself is not.
N)r   r_   r%   ÚflushWarningsÚtest_filePathNotDeprecatedrp   )r(   ÚwarningInfos   & r   r?  Ú(FilePathTests.test_filePathNotDeprecated°  sA   € ô
 	×Ò˜$Ÿ+™+›-Ô(Ø×(Ñ(¨$×*IÑ*IÐ)JÓKˆØ×Ñ˜ bÖ)r!   zTest will run only on Windowsc               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  º  s   € ÷ 
ñ 
¨Tñ 
r!   c                óR  € V P                  V P                  P                  R4      P                  R4       R Fz  pV P                  P                  R4      P                  V4       V P	                  V P                  P                  R4      P                  4       \        P                  ! V4      4       K|  	  V P                  P                  R4      P                  R4       V P	                  V P                  P                  R4      P                  4       P                  4       R4       R# )a  
Getting permissions for a file returns a L{Permissions} object in
Windows.  Windows requires a different test, because user permissions
= group permissions = other permissions.  Also, chmod may not be able
to set the execute bit, so we are skipping tests that set the execute
bit.
rS   rœ  iI  z	r-xr-xr-xN)rœ  rº  )	Ú
addCleanupr9   rq   r»  rp   r9  r   r¡  r}  r¾  s   & r   Útest_getPermissions_WindowsÚ)FilePathTests.test_getPermissions_Windows¹  sÎ   € ð 	�‰˜Ÿ	™	Ÿ™¨Ó0×6Ñ6¸Ô>ã"ˆDØ�I‰I�O‰O˜GÓ$×*Ñ*¨4Ô0Ø×ÑØ—	‘	—‘ Ó(×7Ñ7Ó9¼8×;OÒ;OÐPTÓ;Uöñ #ð
 	�	‰	�‰˜Ó ×&Ñ& uÔ-à×ÑØ�I‰I�O‰O˜GÓ$×3Ñ3Ó5×?Ñ?ÓAÀ;ö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Ð  s   € ÷ /ñ /¨4ñ /r!   c                óª   € V P                  V P                  P                  4       4       V P                  V P                  P                  4       4       R# )z-
Ensure that a file is not a block or socket
N)r’   r9   ÚisBlockDeviceÚisSocketr'   s   &r   Útest_whetherBlockOrSocketÚ'FilePathTests.test_whetherBlockOrSocketÐ  s:   € ð 	×Ñ˜Ÿ™×0Ñ0Ó2Ô3Ø×Ñ˜Ÿ™×+Ñ+Ó-Ö.r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  Ø  s   € ÷ Eñ E¸$ñ Er!   c                óª  € V P                  \        V P                  P                  4       V P                  \        V P                  P                  4       V P                  \        V P                  P
                  4       V P                  \        V P                  P                  4       V P                  \        V P                  P                  4       R# )z=
Verify that certain file stats are not available on Windows
N)ry   ÚNotImplementedErrorr9   ÚgetInodeNumberÚ	getDeviceÚgetNumberOfHardLinksÚ	getUserIDÚ
getGroupIDr'   s   &r   Ú(test_statinfoBitsNotImplementedInWindowsÚ6FilePathTests.test_statinfoBitsNotImplementedInWindows×  s‹   € ð
 	×ÑÔ-¨t¯y©y×/GÑ/GÔHØ×ÑÔ-¨t¯y©y×/BÑ/BÔCØ×ÑÔ-¨t¯y©y×/MÑ/MÔNØ×ÑÔ-¨t¯y©y×/BÑ/BÔCØ×ÑÔ-¨t¯y©y×/CÑ/CÖDr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ã  s   € ÷ Añ A¨Tñ Ar!   c                ó®  € V P                   P                  R4      pV P                   V3 F·  pV P                  VP                  4       \        4       V P                  VP                  4       \        4       V P                  VP                  4       \        4       V P                  VP                  4       \        4       V P                  VP                  4       \        4       K¹  	  V P                  V P                   P                  4       VP                  4       4       V P                  V P                   P                  4       VP                  4       4       R# )zW
Verify that file inode/device/nlinks/uid/gid stats are numbers in
a POSIX environment
rT   N)
r9   rq   ÚassertIsInstancerP  rÖ   rQ  rR  rS  rT  rp   )r(   Úcr4   s   &  r   Útest_statinfoBitsAreNumbersÚ)FilePathTests.test_statinfoBitsAreNumbersâ  sä   € ð �I‰I�O‰O˜HÓ%ˆØ—‘˜A“ˆAØ×!Ñ! !×"2Ñ"2Ó"4´cÔ:Ø×!Ñ! !§+¡+£-´Ô5Ø×!Ñ! !×"8Ñ"8Ó":¼CÔ@Ø×!Ñ! !§+¡+£-´Ô5Ø×!Ñ! !§,¡,£.´#Ö6ñ ð 	×Ñ˜Ÿ™×,Ñ,Ó.°·±³Ô>Ø×Ñ˜Ÿ™×-Ñ-Ó/°·±³Ö@r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r¸  ó  s   € ÷ >ñ >¨dñ >r!   c                óŒ  a a€  ! R R4      pV! 4       oR VV 3R llpVS P                   n        RS P                   n        S P                  S P                   P	                  4       SP
                  4       S P                  S P                   P                  4       SP                  4       S P                  S P                   P                  4       SP                  4       S P                  S P                   P                  4       SP                  4       S P                  S P                   P                  4       SP                  4       R# )z‡
Verify that the right numbers come back from the right accessor methods
for file inode/device/nlinks/uid/gid (in a POSIX environment)
c                  ó*   € ] tR tRt^ÈtRtRtRtRtRt	R# )Ú<FilePathTests.test_statinfoNumbersAreValid.<locals>.FakeStatiú  i,  i�  r8  iX  r   N)
r*   r+   r,   r-   Úst_inoÚst_devÚst_nlinkÚst_uidÚst_gidr/   r   r!   r   ÚFakeStatr`  ú  s   † ØˆFØˆFØˆHØˆFØŒFr!   rf  c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úargsr  Úkwargsr   rD   r   )r   s   "r   r   Ú@FilePathTests.test_statinfoNumbersAreValid.<locals>.__annotate__  s!   € ÷ 	'ñ 	'˜fð 	'°ð 	'¸4ñ 	'r!   c                 ó*   <€ SSP                   n        R # r7   )r9   Ú	_statinfo)rh  ri  Úfaker(   s   *,€€r   Ú
fakeRestatÚ>FilePathTests.test_statinfoNumbersAreValid.<locals>.fakeRestat  s   ø€ Ø"&ˆD�I‰IÖr!   N)r9   r9  rl  rp   rP  ra  rQ  rb  rR  rc  rS  rd  rT  re  )r(   rf  rn  rm  s   f  @r   Útest_statinfoNumbersAreValidÚ*FilePathTests.test_statinfoNumbersAreValidò  sá   ù€ ÷	ñ 	ñ ‹zˆ÷	'ñ 	'ð &ˆ�	‰	Ôð #ˆ�	‰	Ôà×Ñ˜Ÿ™×1Ñ1Ó3°T·[±[ÔAØ×Ñ˜Ÿ™×,Ñ,Ó.°·±Ô<Ø×Ñ˜Ÿ™×7Ñ7Ó9¸4¿=¹=ÔIØ×Ñ˜Ÿ™×,Ñ,Ó.°·±Ô<Ø×Ñ˜Ÿ™×-Ñ-Ó/°·±Ö=r!   r   N)Jr*   r+   r,   r-   r.   r¿  rÆ  r   ÚsymlinkSkiprË  rÑ  rÕ  rá  rô  rü  r  r	  r  r  r  r*  r2  r:  rC  rH  r   ÚgetTyperL  rP  rU  rZ  rb  ri  ro  rs  rw  r  rˆ  rŽ  r’  r—  rž  r¥  rª  r¯  r´  r»  rÃ  rÇ  r³  rÛ  rà  rä  rì  rù  r  r  r  r  r  r  r   r$  r.  r4  rþ   r:  r?  rE  rK  rU  r[  rp  r/   r   r!   r   r¶  r¶  i  sz  † ñõ
õ	
ñ ˆKÐ=Ó>ô
ó ?ð
ñ ˆKÐ=Ó>ôRó ?ðRõXñ ˆKÐ=Ó>ô?ó ?ð?ñ ˆKÐ=Ó>ô+ó ?ð+ñ* ˆKÐ=Ó>ô0ó ?ð0õ.õ&ñ ˆKÐ=Ó>ô$ó ?ð$ñ ˆKÐ=Ó>ô=ó ?ð=ñ& ˆKÐ=Ó>ô
ó ?ð
õ";õQõ
%õ&7õ
Lñ
 ˆH×ÒÓ 'Ñ)Ð+KÓLôSó MðSñ ˆH×ÒÓ 'Ñ)Ð+KÓLô	Mó Mð	MõMõ
õ0õ9õ

õ-ñ ˆKÐ=Ó>ô
;ó ?ð
;õ-õ/õ&
/õ
ñ ˆKÐ=Ó>ô
ó ?ð
ñ ˆKÐ=Ó>ô
ó ?ð
õ2õ-õ&õ(&ñ ?K÷ +õ>	.õ
õõ.%ñ ˆKÐ=Ó>ô%ó ?ð%ñ ˆKÐ=Ó>ô%ó ?ð%õ*õ"L=õ\'õ'õ 	%õ$õ$õ
8õ%õ8õ8õ&*ñ, ˆH×ÒÓ Ð"@ÓAô
ó Bð
õ *ñ �×"Ò"Ó$Ô$Ð&EÓFô
ó Gð
õ,/ñ �×"Ò"Ó$Ô$Ð&EÓFôEó GðEñ ˆH×ÒÓ Ð"@ÓAôAó BðAñ ˆH×ÒÓ Ð"@ÓAô>ó Bô>r!   r¶  c                  ób   € ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
RtR# )ÚSetContentTestsi  z#
Tests for L{FilePath.setContent}.
c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   ÚSetContentTests.__annotate__  s   € ÷ 
4ñ 
4˜Dñ 
4r!   c                ó  € V P                  4       p\        P                  ! V4      pVP                  R4       \	        VR4      ;_uu_ 4       pVP                  4       pRRR4       V P                  RX4       R#   + '       g   i     L$; i)z`
Contents of the file referred to by a L{FilePath} can be written using
L{FilePath.setContent}.
s   hello, worldrê  N)r%   r   r_   r   rM   r¡   rp   )r(   Ú
pathStringr9   r3  Úcontentss   &    r   Ú
test_writeÚSetContentTests.test_write  sc   € ð
 —[‘[“]ˆ
Ü× Ò  Ó,ˆØ�‰˜Ô(Ü�*˜d×#Ô# tØ—y‘y“{ˆH÷ $à×Ñ˜¨(Ö3÷ $×#ús   ÁA9Á9B		c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rw  $  s   € ÷ &ñ & $ñ &r!   c                ó¨   € \        R4      pV P                  \        VP                  R4       V P	                  VP
                  P                  4       R# )z}
If writing to the underlying file raises an exception,
L{FilePath.setContent} raises that exception after closing the file.
rV  s   blahN)r=  ry   r  r   rf   rð   r  rï   s   & r   Útest_fileClosingÚ SetContentTests.test_fileClosing$  s8   € ô
 ˜rÓ"ˆØ×Ñœ' 2§=¡=°'Ô:Ø�‰˜Ÿ™Ÿ™Ö%r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rw  -  s   € ÷ Bñ B Dñ Br!   c                ó  € \        V P                  4       4      pVP                  R4       VP                  R4       VP                  4       pV P	                  \        V4      ^4       V P                  V^ ,          V^,          4       R# )z´
L{FilePath.setContent} will use a different temporary filename on each
invocation, so that multiple processes, threads, or reentrant
invocations will not collide with each other.
s   alphas   betaN)r   r%   r   r2  rp   r³   rp  )r(   rð   ÚopenedSiblingss   &  r   Útest_nameCollisionÚ"SetContentTests.test_nameCollision-  si   € ô ˜dŸk™k›mÓ,ˆØ
�‰�hÔØ
�‰�gÔð Ÿ™Ó)ˆØ×Ñœ˜^Ó,¨aÔ0Ø×Ñ˜N¨1Õ-¨~¸aÕ/@ÖAr!   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rð   zTrackingFilePath[AnyStr]Ú	extensionr_  r   rD   r   )r   s   "r   r   rw  =  s#   € ÷ 
ñ 
Ð#;ð 
Èð 
ÐPTñ 
r!   c                ó0  € VP                  4       pV P                  \        V4      ^R4       V P                  V^ ,          P	                  4       P                  4       P                  V4      RP                  V^ ,          P                  4       V4      4       R# )aá  
Assert that the L{TrackingFilePath} C{fp} was used to open one sibling
with the given extension.

@param fp: A L{TrackingFilePath} which should have been used to open
    file at a sibling path.
@type fp: L{TrackingFilePath}

@param extension: The extension the sibling path is expected to have
    had.
@type extension: L{str}

@raise: C{self.failureException} is raised if the extension of the
    opened file is incorrect or if not exactly one file was opened
    using C{fp}.
z expected exactly one opened filez%{!r} does not end with {!r} extensionN)r2  rp   r³   rf   Ú
asTextModer_  rm  r   )r(   rð   r‡  Úopeneds   &&& r   Ú_assertOneOpenedÚ SetContentTests._assertOneOpened=  sw   € ð" —‘Ó!ˆØ×Ñœ˜V› aÐ)KÔLØ�‰Ø�1�I× Ñ Ó"×+Ñ+Ó-×6Ñ6°yÓAØ3×:Ñ:Ø�q•	×"Ñ"Ó$ ióö	
r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rw  W  s   € ÷ *ñ * tñ *r!   c                ó~   € \        V P                  4       4      pVP                  R4       V P                  VR4       R# )zu
L{FilePath.setContent} creates temporary files with the extension
I{.new} if no alternate extension value is given.
s   helloz.newN©r   r%   r   r‹  rï   s   & r   Útest_defaultExtensionÚ%SetContentTests.test_defaultExtensionW  s0   € ô
 ˜dŸk™k›mÓ,ˆØ
�‰�hÔØ×Ñ˜b &Ö)r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   rw  `  s   € ÷ 5ñ 5 dñ 5r!   c                ó€   € \        V P                  4       4      pVP                  RR4       V P                  VR4       R# )z¼
L{FilePath.setContent} creates temporary files with a user-supplied
extension so that if it is somehow interrupted while writing them the
file that it leaves behind will be identifiable.
s   goodbyes   -something-elsez-something-elseNr�  rï   s   & r   Útest_customExtensionÚ$SetContentTests.test_customExtension`  s4   € ô ˜dŸk™k›mÓ,ˆØ
�‰�jÐ"4Ô5Ø×Ñ˜bÐ"3Ö4r!   r   N)r*   r+   r,   r-   r.   r{  r  r„  r‹  r�  r”  r/   r   r!   r   ru  ru    s+   † ñõ
4õ&õBõ 
õ4*÷5ñ 5r!   ru  c                  ó¶  € ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltR R ltR R lt]! ]P"                  ! 4       R4      R R l4       t]! ]P"                  ! 4       R4      R R l4       t]! ]P"                  ! 4       '       * R4      R R l4       t]! ]P"                  ! 4       '       * R4      R R  l4       tR! R" ltR# R$ ltR% R& ltR' R( ltR) R* ltR+ R, ltR- R. ltR/ R0 ltR1 R2 ltR3 R4 ltR5 R6 lt R7 R8 lt!R9 R: lt"R; R< lt#R= R> lt$R? R@ lt%RA RB lt&RC RD lt'RE RF lt(RG RH lt)RI RJ lt*RK RL lt+RMt,RN# )OÚUnicodeFilePathTestsik  zd
L{FilePath} instances should have the same internal representation as they
were instantiated with.
c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   Ú!UnicodeFilePathTests.__annotate__q  s   € ÷ -ñ -¨4ñ -r!   c                ó„   € \         P                  ! R4      pV P                  \        VP                  4      \
        4       R# )zM
L{FilePath} instantiated with a text path will return a text-mode
FilePath.
õ	   ./monâ‚¬yN)r   r_   rp   rË   r9   r_  rï   s   & r   Útest_UnicodeInstantiationÚ.UnicodeFilePathTests.test_UnicodeInstantiationq  s,   € ô
 ×Ò˜~Ó.ˆØ×Ñœ˜bŸg™g›¬Ö,r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  y  s   € ÷ 2ñ 2°Tñ 2r!   c                óÂ   € \         P                  ! R4      pVP                  RP                  4       4      pV P	                  \        VP                  4      \        4       R# )zq
Calling L{FilePath.child} on a text-mode L{FilePath} with a L{bytes}
subpath will return a bytes-mode FilePath.
õ   ./parent-monâ‚¬yõ   child-monâ‚¬yN©r   r_   rq   r&   rp   rË   r9   r   ©r(   rð   rq   s   &  r   Ú#test_UnicodeInstantiationBytesChildÚ8UnicodeFilePathTests.test_UnicodeInstantiationBytesChildy  sF   € ô
 ×ÒÐ4Ó5ˆØ—‘Ð+×2Ñ2Ó4Ó5ˆØ×Ñœ˜eŸj™jÓ)¬5Ö1r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ‚  s   € ÷ 0ñ 0°tñ 0r!   c                ó¦   € \         P                  ! R4      pVP                  R4      pV P                  \	        VP
                  4      \        4       R# )zl
Calling L{FilePath.child} on a text-mode L{FilePath} with a text
subpath will return a text-mode FilePath.
r   rY  N)r   r_   rq   rp   rË   r9   r_  r£  s   &  r   Ú%test_UnicodeInstantiationUnicodeChildÚ:UnicodeFilePathTests.test_UnicodeInstantiationUnicodeChild‚  s<   € ô
 ×ÒÐ4Ó5ˆØ—‘˜Ó&ˆØ×Ñœ˜eŸj™jÓ)¬3Ö/r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ‹  s   € ÷ 0ñ 0¸dñ 0r!   c                ó¦   € \         P                  ! R4      pVP                  R4      pV P                  \	        VP
                  4      \        4       R# )zs
Calling L{FilePath.preauthChild} on a text-mode L{FilePath} with a text
subpath will return a text-mode FilePath.
r   rY  N)r   r_   r0  rp   rË   r9   r_  r£  s   &  r   Ú,test_UnicodeInstantiationUnicodePreauthChildÚAUnicodeFilePathTests.test_UnicodeInstantiationUnicodePreauthChild‹  s<   € ô
 ×ÒÐ4Ó5ˆØ—‘ Ó-ˆØ×Ñœ˜eŸj™jÓ)¬3Ö/r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ”  s   € ÷ 2ñ 2¸Dñ 2r!   c                óÂ   € \         P                  ! R4      pVP                  RP                  4       4      pV P	                  \        VP                  4      \        4       R# )zu
Calling L{FilePath.preauthChild} on a text-mode L{FilePath} with a bytes
subpath will return a bytes-mode FilePath.
r   r¡  N)r   r_   r0  r&   rp   rË   r9   r   r£  s   &  r   Ú*test_UnicodeInstantiationBytesPreauthChildÚ?UnicodeFilePathTests.test_UnicodeInstantiationBytesPreauthChild”  sF   € ô
 ×ÒÐ4Ó5ˆØ—‘Ð 2× 9Ñ 9Ó ;Ó<ˆØ×Ñœ˜eŸj™jÓ)¬5Ö1r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  �  s   € ÷ /ñ /¨ñ /r!   c                ó„   € \         P                  ! R4      pV P                  \        VP                  4      \
        4       R# )zR
L{FilePath} instantiated with a L{bytes} path will return a bytes-mode
FilePath.
ó   ./N)r   r_   rp   rË   r9   r   rï   s   & r   Útest_BytesInstantiationÚ,UnicodeFilePathTests.test_BytesInstantiation�  s,   € ô
 ×Ò˜uÓ%ˆØ×Ñœ˜bŸg™g›¬Ö.r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ¥  s   € ÷ 2ñ 2°4ñ 2r!   c                óÂ   € \         P                  ! R4      pVP                  RP                  4       4      pV P	                  \        VP                  4      \        4       R# )zo
Calling L{FilePath.child} on a bytes-mode L{FilePath} with a bytes
subpath will return a bytes-mode FilePath.
r´  r¡  Nr¢  r£  s   &  r   Ú!test_BytesInstantiationBytesChildÚ6UnicodeFilePathTests.test_BytesInstantiationBytesChild¥  sE   € ô
 ×Ò˜uÓ%ˆØ—‘Ð+×2Ñ2Ó4Ó5ˆØ×Ñœ˜eŸj™jÓ)¬5Ö1r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ®  s   € ÷ 0ñ 0°Tñ 0r!   c                óÂ   € \         P                  ! RP                  4       4      pVP                  R4      pV P	                  \        VP                  4      \        4       R# )zm
Calling L{FilePath.child} on a bytes-mode L{FilePath} with a text
subpath will return a text-mode FilePath.
u   parent-monâ‚¬yrY  N)r   r_   r&   rq   rp   rË   r9   r_  r£  s   &  r   Ú#test_BytesInstantiationUnicodeChildÚ8UnicodeFilePathTests.test_BytesInstantiationUnicodeChild®  sE   € ô
 ×ÒÐ2×9Ñ9Ó;Ó<ˆØ—‘˜Ó&ˆØ×Ñœ˜eŸj™jÓ)¬3Ö/r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ·  s   € ÷ 2ñ 2¸$ñ 2r!   c                óÞ   € \         P                  ! RP                  4       4      pVP                  RP                  4       4      pV P	                  \        VP                  4      \        4       R# )zv
Calling L{FilePath.preauthChild} on a bytes-mode L{FilePath} with a
bytes subpath will return a bytes-mode FilePath.
r   r¡  N)r   r_   r&   r0  rp   rË   r9   r   r£  s   &  r   Ú(test_BytesInstantiationBytesPreauthChildÚ=UnicodeFilePathTests.test_BytesInstantiationBytesPreauthChild·  sO   € ô
 ×ÒÐ4×;Ñ;Ó=Ó>ˆØ—‘Ð 2× 9Ñ 9Ó ;Ó<ˆØ×Ñœ˜eŸj™jÓ)¬5Ö1r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  À  s   € ÷ 0ñ 0¸Dñ 0r!   c                óÂ   € \         P                  ! RP                  4       4      pVP                  R4      pV P	                  \        VP                  4      \        4       R# )zt
Calling L{FilePath.preauthChild} on a bytes-mode L{FilePath} with a text
subpath will return a text-mode FilePath.
r   rY  N)r   r_   r&   r0  rp   rË   r9   r_  r£  s   &  r   Ú*test_BytesInstantiationUnicodePreauthChildÚ?UnicodeFilePathTests.test_BytesInstantiationUnicodePreauthChildÀ  sE   € ô
 ×ÒÐ4×;Ñ;Ó=Ó>ˆØ—‘ Ó-ˆØ×Ñœ˜eŸj™jÓ)¬3Ö/r!   zTest will not work on Windowsc               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  Ê  s   € ÷ @ñ @ $ñ @r!   c                ól   € \         P                  ! R4      p\        V4      pV P                  RV4       R# )úC
The repr of a L{unicode} L{FilePath} shouldn't burst into flames.
r/  u   FilePath('/monâ‚¬y')N©r   r_   Úreprrp   ©r(   rð   Ú
reprOutputs   &  r   Útest_unicodereprÚ%UnicodeFilePathTests.test_unicodereprÉ  s.   € ô
 ×Ò˜}Ó-ˆÜ˜"“Xˆ
Ø×ÑÐ2°JÖ?r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  Ó  s   € ÷ Qñ Q ñ Qr!   c                óˆ   € \         P                  ! RP                  4       4      p\        V4      pV P	                  RV4       R# )úA
The repr of a L{bytes} L{FilePath} shouldn't burst into flames.
u   /parent-monâ‚¬yz%FilePath(b'/parent-mon\xe2\x82\xacy')N)r   r_   r&   rË  rp   rÌ  s   &  r   Útest_bytesreprÚ#UnicodeFilePathTests.test_bytesreprÒ  s8   € ô
 ×ÒÐ3×:Ñ:Ó<Ó=ˆÜ˜"“Xˆ
Ø×ÑÐCÀZÖPr!   zTest only works on Windowsc               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  Ü  s   € ÷ ;ñ ;¨ñ ;r!   c                ól   € \         P                  ! R4      p\        V4      pV P                  RV4       R# )rÉ  zC:\zFilePath('C:\\')NrÊ  rÌ  s   &  r   Útest_unicodereprWindowsÚ,UnicodeFilePathTests.test_unicodereprWindowsÛ  s.   € ô
 ×Ò˜vÓ&ˆÜ˜"“Xˆ
Ø×ÑÐ-¨zÖ:r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  å  s   € ÷ <ñ < tñ <r!   c                ól   € \         P                  ! R4      p\        V4      pV P                  RV4       R# )rÒ  s   C:\zFilePath(b'C:\\')NrÊ  rÌ  s   &  r   Útest_bytesreprWindowsÚ*UnicodeFilePathTests.test_bytesreprWindowsä  s.   € ô
 ×Ò˜wÓ'ˆÜ˜"“Xˆ
Ø×ÑÐ.°
Ö;r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  í  s   € ÷ 7ñ 7¨Dñ 7r!   c                ó¢   € \         P                  ! R4      pVP                  R4      pV P                  V^ ,          P                  \
        4       R# )zD
C{globChildren} will return the same type as the pattern argument.
Ú/r!  N)r   r_   ÚglobChildrenrY  r9   r   ©r(   rð   rÂ   s   &  r   Útest_mixedTypeGlobChildrenÚ/UnicodeFilePathTests.test_mixedTypeGlobChildrení  s<   € ô ×Ò˜sÓ#ˆØ—?‘? 4Ó(ˆØ×Ñ˜h q�k×.Ñ.´Ö6r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  õ  s   € ÷ 5ñ 5¨$ñ 5r!   c                ó¢   € \         P                  ! R4      pVP                  R4      pV P                  V^ ,          P                  \
        4       R# )z(
C{globChildren} works with L{unicode}.
rß  Ú*N)r   r_   rà  rY  r9   r_  rá  s   &  r   Útest_unicodeGlobChildrenÚ-UnicodeFilePathTests.test_unicodeGlobChildrenõ  s<   € ô ×Ò˜sÓ#ˆØ—?‘? 3Ó'ˆØ×Ñ˜h q�k×.Ñ.´Ö4r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ý  s   € ÷ 2ñ 2 dñ 2r!   c                óz   € \         P                  ! R4      pV P                  VP                  4       \        4       R# )zA
Calling C{basename} on an text- L{FilePath} returns L{unicode}.
ú./N)r   r_   rY  r_  r_  rï   s   & r   Útest_unicodeBasenameÚ)UnicodeFilePathTests.test_unicodeBasenameý  s*   € ô ×Ò˜tÓ$ˆØ×Ñ˜bŸk™k›m¬SÖ1r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™    s   € ÷ 1ñ 1 Tñ 1r!   c                óz   € \         P                  ! R4      pV P                  VP                  4       \        4       R# )zC
Calling C{dirname} on a text-mode L{FilePath} returns L{unicode}.
rë  N)r   r_   rY  rC   r_  rï   s   & r   Útest_unicodeDirnameÚ(UnicodeFilePathTests.test_unicodeDirname  s*   € ô ×Ò˜tÓ$ˆØ×Ñ˜bŸj™j›l¬CÖ0r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™    s   € ÷ 0ñ 0 Dñ 0r!   c                ó’   € \         P                  ! R4      pVP                  4       pV P                  VP                  \
        4       R# )zS
Calling C{parent} on a text-mode L{FilePath} will return a text-mode
L{FilePath}.
rë  N)r   r_   rh  rY  r9   r_  )r(   rð   rh  s   &  r   Útest_unicodeParentÚ'UnicodeFilePathTests.test_unicodeParent  s3   € ô
 ×Ò˜tÓ$ˆØ—‘“ˆØ×Ñ˜fŸk™k¬3Ö/r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™    s   € ÷ 7ñ 7°ñ 7r!   c                ó”   € \         P                  ! R4      pVP                  R4      pV P                  VP                  \
        4       R# )z`
A L{bytes} extension to C{temporarySibling} will mean a L{bytes} mode
L{FilePath} is returned.
r›  ó   .txtN)r   r_   rf  rY  r9   r   ©r(   rð   ÚtempSiblings   &  r   Útest_mixedTypeTemporarySiblingÚ3UnicodeFilePathTests.test_mixedTypeTemporarySibling  s:   € ô
 ×Ò˜~Ó.ˆØ×)Ñ)¨'Ó2ˆØ×Ñ˜k×.Ñ.´Ö6r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™    s   € ÷ 5ñ 5¨dñ 5r!   c                ó”   € \         P                  ! R4      pVP                  R4      pV P                  VP                  \
        4       R# )zd
A L{unicode} extension to C{temporarySibling} will mean a L{unicode}
mode L{FilePath} is returned.
u   /tmp/monâ‚¬yú.txtN)r   r_   rf  rY  r9   r_  rù  s   &  r   Útest_unicodeTemporarySiblingÚ1UnicodeFilePathTests.test_unicodeTemporarySibling  s;   € ô
 ×ÒÐ0Ó1ˆØ×)Ñ)¨&Ó1ˆØ×Ñ˜k×.Ñ.´Ö4r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  &  s   € ÷ 3ñ 3°dñ 3r!   c                óV  € \         P                  ! R4      p\         P                  ! VP                  4       R,           4      pVP                  4        VP	                  R4      pVf   Q hV P                  V\         P                  4       V P                  VP                  \        4       R# )z†
C{siblingExtensionSearch} called with L{bytes} on a L{unicode}-mode
L{FilePath} will return a L{list} of L{bytes}-mode L{FilePath}s.
r›  rÿ  rø  N)r   r_   Ú_asTextPathr$  r"  rY  r9   r   ©r(   rð   r^  ÚnewPaths   &   r   Ú$test_mixedTypeSiblingExtensionSearchÚ9UnicodeFilePathTests.test_mixedTypeSiblingExtensionSearch&  s   € ô
 ×Ò˜~Ó.ˆÜ×#Ò# B§N¡NÓ$4°vÕ$=Ó>ˆØ�‰ŒØ×+Ñ+¨GÓ4ˆØÒ"Ð"Ð"à×Ñ˜g¤x×'8Ñ'8Ô9Ø×Ñ˜gŸl™l¬EÖ2r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  4  s   € ÷ 1ñ 1°Dñ 1r!   c                óV  € \         P                  ! R4      p\         P                  ! VP                  4       R,           4      pVP                  4        VP	                  R4      pVf   Q hV P                  V\         P                  4       V P                  VP                  \        4       R# )zŠ
C{siblingExtensionSearch} called with L{unicode} on a L{unicode}-mode
L{FilePath} will return a L{list} of L{unicode}-mode L{FilePath}s.
r›  rÿ  N)r   r_   r  r$  r"  rY  r9   r_  r  s   &   r   Ú"test_unicodeSiblingExtensionSearchÚ7UnicodeFilePathTests.test_unicodeSiblingExtensionSearch4  s   € ô
 ×Ò˜~Ó.ˆÜ×#Ò# B§N¡NÓ$4°vÕ$=Ó>ˆØ�‰Œà×+Ñ+¨FÓ3ˆØÒ"Ð"Ð"à×Ñ˜g¤x×'8Ñ'8Ô9Ø×Ñ˜gŸl™l¬CÖ0r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  C  s   € ÷ 3ñ 3°ñ 3r!   c                óJ  € \         P                  ! R4      p\         P                  ! VP                  4       R,           4      pVP                  4        VP	                  R4      pV P                  V\         P                  4       V P                  VP                  \        4       R# )zt
C{siblingExtension} called with L{bytes} on a L{unicode}-mode
L{FilePath} will return a L{bytes}-mode L{FilePath}.
r›  rÿ  rø  N)r   r_   r  r$  r#  rY  r9   r   r  s   &   r   Útest_mixedTypeSiblingExtensionÚ3UnicodeFilePathTests.test_mixedTypeSiblingExtensionC  ss   € ô
 ×Ò˜~Ó.ˆÜ×#Ò# B§N¡NÓ$4°vÕ$=Ó>ˆØ�‰Œà×%Ñ% gÓ.ˆà×Ñ˜g¤x×'8Ñ'8Ô9Ø×Ñ˜gŸl™l¬EÖ2r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  Q  s   € ÷ 1ñ 1¨dñ 1r!   c                óJ  € \         P                  ! R4      p\         P                  ! VP                  4       R,           4      pVP                  4        VP	                  R4      pV P                  V\         P                  4       V P                  VP                  \        4       R# )zx
C{siblingExtension} called with L{unicode} on a L{unicode}-mode
L{FilePath} will return a L{unicode}-mode L{FilePath}.
r›  rÿ  N)r   r_   r  r$  r#  rY  r9   r_  r  s   &   r   Útest_unicodeSiblingExtensionÚ1UnicodeFilePathTests.test_unicodeSiblingExtensionQ  ss   € ô
 ×Ò˜~Ó.ˆÜ×#Ò# B§N¡NÓ$4°vÕ$=Ó>ˆØ�‰Œà×%Ñ% fÓ-ˆà×Ñ˜g¤x×'8Ñ'8Ô9Ø×Ñ˜gŸl™l¬CÖ0r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  _  s   € ÷ Fñ F°ñ Fr!   c                óö  € \         P                  ! V P                  4       4      pVP                  4        \         P                  ! V P                  4       4      pV P	                  VP                  R4      VP                  4       4       V P	                  VP                  R4      VP                  4       4       V P	                  VP                  R4      R4       V P	                  VP                  R4      R4       R# )zf
C{siblingExtension} passed an empty string should return the same path,
in the type of its argument.
r!   rV  N)r   r_   r%   r$  rp   r"  ÚasBytesModer‰  )r(   r�   Ú	notExistss   &  r   Útest_selfSiblingExtensionSearchÚ4UnicodeFilePathTests.test_selfSiblingExtensionSearch_  s·   € ô
 ×"Ò" 4§;¡;£=Ó1ˆØ�‰ŒÜ×%Ò% d§k¡k£mÓ4ˆ	Ø×Ñ˜×6Ñ6°sÓ;¸V×=OÑ=OÓ=QÔRØ×Ñ˜×6Ñ6°rÓ:¸F×<MÑ<MÓ<OÔPØ×Ñ˜×9Ñ9¸"Ó=¸tÔDØ×Ñ˜×9Ñ9¸#Ó>ÀÖEr!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  l  s   € ÷ 3ñ 3°$ñ 3r!   c                ón  a€ \         P                  ! R4      oSP                  4        V P                  V3R l4       SP	                  R4      pVP                  4        SP                  R4      pVf   Q hV P                  V\         P                  4       V P                  VP                  \        4       R# )zv
C{childSearchPreauth} called with L{bytes} on a L{unicode}-mode
L{FilePath} will return a L{bytes}-mode L{FilePath}.
r›  c                 ó$   <€ S P                  4       # r7   ©r÷   ©rð   s   €r   r„  ÚGUnicodeFilePathTests.test_mixedTypeChildSearchPreauth.<locals>.<lambda>s  ó   ø€  §	¡	¤r!   útext.txts   text.txtN)
r   r_   r`  rD  rq   r$  ÚchildSearchPreauthrY  r9   r   ©r(   rq   r  rð   s   &  @r   Ú test_mixedTypeChildSearchPreauthÚ5UnicodeFilePathTests.test_mixedTypeChildSearchPreauthl  s‹   ø€ ô
 ×Ò˜~Ó.ˆØ
×ÑÔØ�‰Ô+Ô,Ø—‘˜Ó$ˆØ�‰Œà×'Ñ'¨Ó4ˆØÒ"Ð"Ð"à×Ñ˜g¤x×'8Ñ'8Ô9Ø×Ñ˜gŸl™l¬EÖ2r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  }  s   € ÷ 1ñ 1°ñ 1r!   c                ón  a€ \         P                  ! R4      oSP                  4        V P                  V3R l4       SP	                  R4      pVP                  4        SP                  R4      pVf   Q hV P                  V\         P                  4       V P                  VP                  \        4       R# )zz
C{childSearchPreauth} called with L{unicode} on a L{unicode}-mode
L{FilePath} will return a L{unicode}-mode L{FilePath}.
r›  c                 ó$   <€ S P                  4       # r7   r  r  s   €r   r„  ÚEUnicodeFilePathTests.test_unicodeChildSearchPreauth.<locals>.<lambda>„  r!  r!   r"  N)
r   r_   r`  rD  rq   r$  r#  rY  r9   r_  r$  s   &  @r   Útest_unicodeChildSearchPreauthÚ3UnicodeFilePathTests.test_unicodeChildSearchPreauth}  s‹   ø€ ô
 ×Ò˜~Ó.ˆØ
×ÑÔØ�‰Ô+Ô,Ø—‘˜Ó$ˆØ�‰Œà×'Ñ'¨
Ó3ˆØÒ"Ð"Ð"à×Ñ˜g¤x×'8Ñ'8Ô9Ø×Ñ˜gŸl™l¬CÖ0r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  Ž  s   € ÷ 1ñ 1¨Tñ 1r!   c                ó´   € \         P                  ! R4      pVP                  4       pV P                  W4       V P	                  VP
                  \        4       R# )úZ
C{asBytesMode} on a L{unicode}-mode L{FilePath} returns a new
L{bytes}-mode L{FilePath}.
ú./tmpN)r   r_   r  r²   rY  r9   r   ©r(   rð   Únewfps   &  r   Útest_asBytesModeFromUnicodeÚ0UnicodeFilePathTests.test_asBytesModeFromUnicodeŽ  sB   € ô
 ×Ò˜wÓ'ˆØ—‘Ó ˆØ×Ñ˜Ô#Ø×Ñ˜eŸj™j¬%Ö0r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ˜  s   € ÷ /ñ /¨$ñ /r!   c                ó´   € \         P                  ! R4      pVP                  4       pV P                  W4       V P	                  VP
                  \        4       R# )r/  ó   ./tmpN)r   r_   r‰  r²   rY  r9   r_  r1  s   &  r   Útest_asTextModeFromBytesÚ-UnicodeFilePathTests.test_asTextModeFromBytes˜  sA   € ô
 ×Ò˜xÓ(ˆØ—‘“ˆØ×Ñ˜Ô#Ø×Ñ˜eŸj™j¬#Ö.r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ¢  s   € ÷ 1ñ 1¨4ñ 1r!   c                ó´   € \         P                  ! R4      pVP                  4       pV P                  W4       V P	                  VP
                  \        4       R# )z[
C{asBytesMode} on a L{bytes}-mode L{FilePath} returns the same
L{bytes}-mode L{FilePath}.
r7  N)r   r_   r  r±   rY  r9   r   r1  s   &  r   Útest_asBytesModeFromBytesÚ.UnicodeFilePathTests.test_asBytesModeFromBytes¢  s@   € ô
 ×Ò˜xÓ(ˆØ—‘Ó ˆØ�‰�bÔ Ø×Ñ˜eŸj™j¬%Ö0r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ¬  s   € ÷ /ñ /¨Dñ /r!   c                ó´   € \         P                  ! R4      pVP                  4       pV P                  W4       V P	                  VP
                  \        4       R# )z^
C{asTextMode} on a L{unicode}-mode L{FilePath} returns the same
L{unicode}-mode L{FilePath}.
r0  N)r   r_   r‰  r±   rY  r9   r_  r1  s   &  r   Útest_asTextModeFromUnicodeÚ/UnicodeFilePathTests.test_asTextModeFromUnicode¬  s?   € ô
 ×Ò˜wÓ'ˆØ—‘“ˆØ�‰�bÔ Ø×Ñ˜eŸj™j¬#Ö.r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ¶  s   € ÷ 3ñ 3¸ñ 3r!   c                óŽ   € \         P                  ! R4      pVP                  RR7      pV P                  RVP                  4       R# )zŽ
C{asBytesMode} with an C{encoding} argument uses that encoding when
coercing the L{unicode}-mode L{FilePath} to a L{bytes}-mode L{FilePath}.
õ   â˜ƒr#   ©Úencodingó   â˜ƒN)r   r_   r  r^  r9   r1  s   &  r   Ú'test_asBytesModeFromUnicodeWithEncodingÚ<UnicodeFilePathTests.test_asBytesModeFromUnicodeWithEncoding¶  s6   € ô
 ×Ò˜xÓ(ˆØ—‘¨�Ó0ˆØ�‰�o u§z¡zÖ2r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  ¿  s   € ÷ ,ñ ,°dñ ,r!   c                óŽ   € \         P                  ! R4      pVP                  RR7      pV P                  RVP                  4       R# )z�
C{asTextMode} with an C{encoding} argument uses that encoding when
coercing the L{bytes}-mode L{FilePath} to a L{unicode}-mode L{FilePath}.
rG  r#   rE  rD  N)r   r_   r‰  r^  r9   r1  s   &  r   Ú$test_asTextModeFromBytesWithEncodingÚ9UnicodeFilePathTests.test_asTextModeFromBytesWithEncoding¿  s6   € ô
 ×Ò˜Ó/ˆØ—‘ w�Ó/ˆØ�‰�h §
¡
Ö+r!   c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  È  s   € ÷ -ñ -Àñ -r!   c                óÊ   € \         P                  ! R4      pV P                  \        4      ;_uu_ 4        VP	                  RR7       RRR4       R#   + '       g   i     R# ; i)zu
C{asBytesMode} with an C{encoding} argument that can't be used to encode
the unicode path raises a L{UnicodeError}.
rD  ÚasciirE  N)r   r_   ry   ÚUnicodeErrorr  rï   s   & r   Ú/test_asBytesModeFromUnicodeWithUnusableEncodingÚDUnicodeFilePathTests.test_asBytesModeFromUnicodeWithUnusableEncodingÈ  sB   € ô
 ×Ò˜xÓ(ˆØ×Ñœ|×,Õ,Ø�N‰N GˆNÔ,÷ -×,×,Ò,úó   ´AÁA"	c               ó   € V ^8„  d   QhRR/# rQ   r   )r   s   "r   r   r™  Ñ  s   € ÷ -ñ -¸dñ -r!   c                óÊ   € \         P                  ! R4      pV P                  \        4      ;_uu_ 4        VP	                  RR7       RRR4       R#   + '       g   i     R# ; i)zt
C{asTextMode} with an C{encoding} argument that can't be used to encode
the unicode path raises a L{UnicodeError}.
s   \u2603zutf-32rE  N)r   r_   ry   rQ  r‰  rï   s   & r   Ú,test_asTextModeFromBytesWithUnusableEncodingÚAUnicodeFilePathTests.test_asTextModeFromBytesWithUnusableEncodingÑ  sB   € ô
 ×Ò˜zÓ*ˆØ×Ñœ|×,Õ,Ø�M‰M 8ˆMÔ,÷ -×,×,Ò,úrT  r   N)-r*   r+   r,   r-   r.   rœ  r¤  r¨  r¬  r°  rµ  r¹  r½  rÁ  rÅ  r   r   rþ   rÎ  rÓ  r×  rÛ  râ  rç  rì  rð  rô  rû  r   r  r  r  r  r  r%  r+  r3  r8  r<  r@  rH  rL  rR  rW  r/   r   r!   r   r—  r—  k  sO  † ñõ
-õ2õ0õ0õ2õ/õ2õ0õ2õ0ñ ˆH×ÒÓ Ð"AÓBô@ó Cð@ñ ˆH×ÒÓ Ð"AÓBôQó CðQñ �×"Ò"Ó$Ô$Ð&BÓCô;ó Dð;ñ �×"Ò"Ó$Ô$Ð&BÓCô<ó Dð<õ7õ5õ2õ1õ0õ7õ5õ3õ1õ3õ1õFõ3õ"1õ"1õ/õ1õ/õ3õ,õ-÷-ñ -r!   r—  )7r.   Ú
__future__r   r¢  Úior8   r>  rŒ  ÚsysrY   Úpprintr   Útypingr   r   r   r   r   r	   r
   r   r   Úunittestr   Úzope.interface.verifyr   r   Útwisted.pythonr   Útwisted.python.filepathr   r   Útwisted.python.runtimer   Útwisted.python.win32r   Útwisted.trial.unittestr   r$   Ú_supportsSymlinksrr  r   r1   r_   rÜ   rä   ræ   r   r   r=  rM  rO  r¶  ru  r—  r   r!   r   Ú<module>rf     s4  ðñõ #ã Û 	Û 	Û Û Û 
Û Ý ß T× TÕ TÝ å .å å #ß 9Ý +Ý 0Ý Bà×,Ò,Ó.Ô.€ô	5�Hô 	5ôz6˜Mô z6ôz
�h×'Ñ'¨Õ/ô 
ð4 ‡<�<�7Ô÷ñ ô#! ô #!÷L!ñ !ôH<�x×(Ñ(¨Õ0ô <ô~/?˜×)Ñ)¨&Õ1ô /?ñd ˆCƒL€ô]O�}ô ]Oô@g>Ð)ô g>ôTU5�mô U5ôpm-˜8ö m-r!   