
    h                        S SK Jr  S SKrS SKJrJr  SSKJrJr  SSK	J
r
JrJrJrJrJr  SSKJr  SSKJr  \R(                  (       a  S S	KJrJrJrJrJrJr  SS
KJr  SSKJr   " S S\5      rg)    )annotationsN)ABCabstractmethod   )copy_dir	copy_file)DestinationExistsDirectoryExpectedFileExpectedFilesystemClosed	NoSysPathResourceNotFound)dirnameBoundWalker)IOAny
CollectionIteratorSelfType)InfoSubFSc                     \ rS rSr% SrSrS\S'   \S#S$S jj5       r\S%S j5       r	\S%S j5       r
\S%S	 j5       r\S&S
 j5       r\S'S(S jj5       r\S'S(S jj5       r\S)S*S jj5       r\S+S j5       r\S+S j5       r\S+S j5       r\S'S,S jj5       rS-S jrS rS.S jrS/S jrS rS rSS.S0S jjr S)     S1S jjr\S2S j5       rS3S jrS4S jrS'S5S jjr S'S6S  jjr!S'S6S! jjr"S"r#g)7FS   z+Abstract base class for custom filesystems.Fbool_closedc                    g N )selfpathmodekwargss       Y/var/www/fran/franai/venv/lib/python3.13/site-packages/fontTools/misc/filesystem/_base.pyopenFS.open   s    FI    c                    g r!   r"   r#   r$   s     r'   exists	FS.exists!       ),r*   c                    g r!   r"   r,   s     r'   isdirFS.isdir$   s    (+r*   c                    g r!   r"   r,   s     r'   isfile	FS.isfile'   r/   r*   c                    g r!   r"   r,   s     r'   listdir
FS.listdir*   s    /2r*   c                    g r!   r"   r#   r$   recreates      r'   makedir
FS.makedir-   s    CFr*   c                    g r!   r"   r:   s      r'   makedirsFS.makedirs0   s    DGr*   Nc                    g r!   r"   r#   r$   
namespacess      r'   getinfo
FS.getinfo3   s    UXr*   c                    g r!   r"   r,   s     r'   remove	FS.remove6   r/   r*   c                    g r!   r"   r,   s     r'   	removedirFS.removedir9   s    ,/r*   c                    g r!   r"   r,   s     r'   
removetreeFS.removetree<   s    -0r*   c                    g r!   r"   )r#   srcdstcreates       r'   movedir
FS.movedir?   s    ILr*   c                "    [        SU < S35      e)Nthe filesystem z has no system path)r   r,   s     r'   
getsyspathFS.getsyspathB   s    /$1DEFFr*   c                    SU l         g )NTr   r#   s    r'   closeFS.closeE   s	    r*   c                    U R                   $ r!   rZ   r[   s    r'   isclosedFS.isclosedH   s    ||r*   c                    U $ r!   r"   r[   s    r'   	__enter__FS.__enter__K   s    r*   c                $    U R                  5         g)NF)r\   )r#   exc_typeexctbs       r'   __exit__FS.__exit__N   s    

r*   c                F    U R                   (       a  [        SU < S35      eg )NrV   z
 is closed)r   r   r[   s    r'   checkFS.checkR   s"    <<"_THJ#GHH r*   )factoryc               (    Uc  SSK Jn  UnU" X5      $ )u+   Return a sub‑filesystem rooted at `path`.r   r   )_subfsr   )r#   r$   rm   r   s       r'   opendir
FS.opendirV   s    ?%Gt""r*   c                B   ^ ^^ UUU 4S jT R                  T5       5       $ )Nc              3  R   >#    U  H  nTR                  T S U 3T5      v   M     g7f)/N)rD   ).0prC   r$   r#   s     r'   	<genexpr>FS.scandir.<locals>.<genexpr>a   s+     TASAvQqc]J77ASs   $')r7   rB   s   ```r'   scandir
FS.scandir^   s     UdASTTr*   c                    [        U 5      $ r!   r   r[   s    r'   walkFS.walkc   s    4  r*   c                |    U R                  US5       nUR                  5       sS S S 5        $ ! , (       d  f       g = f)Nrb)r(   read)r#   r$   fs      r'   	readbytesFS.readbytesg   s'    YYtT"a668 #""s   -
;c                ~    U R                  US5       nUR                  U5        S S S 5        g ! , (       d  f       g = f)Nwb)r(   write)r#   r$   datar   s       r'   
writebytesFS.writebytesk   s)    YYtT"aGGDM #""s   .
<c                    U(       d  U R                  U5      (       a  gU R                  US5          S S S 5        g! , (       d  f       g= f)NFr   T)r-   r(   )r#   r$   wipes      r'   rR   	FS.createo   s;    D))YYtT" # #"s	   <
A
c                |   U R                  U5      (       d  [        U< S35      eU R                  U5      (       d  [        SU< S35      eU(       d&  U R                  U5      (       a  [	        SU< S35      eU R                  [        U5      5      (       d  [        S[        U5      < S35      e[        XX5        g )N does not existpath z should be a filezdestination z already exists should be a directory)	r-   r   r4   r   r	   r1   r   r
   r   )r#   src_pathdst_path	overwrites       r'   copyFS.copyv   s    {{8$$"h\#ABBX&&xl2CDEET[[22#l8,o$NOOzz'(+,,#eGH,=+@@V$WXX$$1r*   c                    U(       d%  U R                  U5      (       d  [        U< S35      eU R                  U5      (       d  [        SU< S35      e[	        XX5        g )Nr   r   r   )r-   r   r1   r
   r   )r#   r   r   rR   s       r'   copydir
FS.copydir   sS    dkk(33"h\#ABBzz(###eH<7M$NOO0r*   rZ   )r   )r$   strr%   r   returnzIO[Any])r$   r   r   r   )r$   r   r   z	list[str])F)r$   r   r;   r   r   r   r!   )r$   r   rC   Collection[str] | Noner   r   )r$   r   r   None)rP   r   rQ   r   rR   r   r   r   )r$   r   r   r   )r   r   )r   r   )r$   r   rm   zType[SubFS] | Noner   r   )r$   r   rC   r   r   zIterator[Info])r   r   )r$   r   r   bytes)r$   r   r   r   )r$   r   r   r   )r   r   r   r   )$__name__
__module____qualname____firstlineno____doc__r   __annotations__r   r(   r-   r1   r4   r7   r<   r?   rD   rG   rJ   rM   rS   rW   r\   r_   rb   rh   rk   rp   ry   propertyr|   r   r   rR   r   r   __static_attributes__r"   r*   r'   r   r      s<   5GTI I, ,+ +, ,2 2F FG GX X, ,/ /0 0L LGI CG # ?CUU%;U	U
 ! !	21 1r*   r   ) 
__future__r   typingabcr   r   _copyr   r   _errorsr	   r
   r   r   r   r   _pathr   _walkr   TYPE_CHECKINGr   r   r   r   r   r   _infor   ro   r   r   r"   r*   r'   <module>r      sF    "  # &   	@@m1 m1r*   