+
    ˜°³jI  ã            	       ó˜   € ^ RI HtHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 R.t]! R4       ! R R]]]]3,          ,          4      4       tR	# )
é    )ÚIterableÚIterator)ÚIOBase)Úfunctional_datapipe)ÚIterDataPipe)Ú get_file_binaries_from_pathnamesÚFileOpenerIterDataPipeÚ
open_filesc                   ój   a a€ ] tR t^t oRtR	V3R lV 3R llltV3R lR ltV3R lR ltRtVt	V ;t
# )
r	   a%  
Given pathnames, opens files and yield pathname and file stream in a tuple (functional name: ``open_files``).

Args:
    datapipe: Iterable datapipe that provides pathnames
    mode: An optional string that specifies the mode in which
        the file is opened by ``open()``. It defaults to ``r``, other options are
        ``b`` for reading in binary mode and ``t`` for text mode.
    encoding: An optional string that specifies the encoding of the
        underlying file. It defaults to ``None`` to match the default encoding of ``open``.
    length: Nominal length of the datapipe

Note:
    The opened file handles will be closed by Python's GC periodically. Users can choose
    to close them explicitly.

Example:
    >>> # xdoctest: +SKIP
    >>> from torchdata.datapipes.iter import (
    ...     FileLister,
    ...     FileOpener,
    ...     StreamReader,
    ... )
    >>> dp = FileLister(root=".").filter(lambda fname: fname.endswith(".txt"))
    >>> dp = FileOpener(dp)
    >>> dp = StreamReader(dp)
    >>> list(dp)
    [('./abc.txt', 'abc')]
c          
      óT   <€ V ^8„  d   QhRS[ S[,          RS[RS[R,          RS[RR/# )é   ÚdatapipeÚmodeÚencodingNÚlengthÚreturn)r   ÚstrÚint)ÚformatÚ__classdict__s   "€Úk/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/utils/data/datapipes/iter/fileopener.pyÚ__annotate__Ú#FileOpenerIterDataPipe.__annotate__.   sE   ø€ ÷ "ñ "á™3•-ð"ñ ð"ñ ˜•*ð	"ñ
 ð"ð 
ñ"ó    c                ó¾   <€ \         SV `  4        Wn        W n        W0n        V P                  R9  d   \        RV 24      hR V9   d   Ve   \        R4      hW@n        R# )ÚbzInvalid mode Nz-binary mode doesn't take an encoding argument)r   ÚtÚrbÚrtÚr)ÚsuperÚ__init__r   r   r   Ú
ValueErrorr   )Úselfr   r   r   r   Ú	__class__s   &&&&&€r   r"   ÚFileOpenerIterDataPipe.__init__.   s]   ø€ ô 	‰ÑÔØ'/ŒØŒ	Ø$,Œà�9‰9Ð7Ô7Ü˜}¨T¨FÐ3Ó4Ð4ð �$Œ;˜8Ò/ÜÐLÓMÐMà!Žr   c                óF   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          /# ©r   r   )r   Útupler   r   )r   r   s   "€r   r   r   G   s"   ø€ ÷ 
ñ 
™(¡5©©f¨Õ#5Õ6ñ 
r   c              #  óx   "  € \        V P                  V P                  V P                  4       R j  x€L
  R #  L5i)N)r   r   r   r   ©r$   s   &r   Ú__iter__ÚFileOpenerIterDataPipe.__iter__G   s*   é € Ü3Ø�M‰M˜4Ÿ9™9 d§m¡mó
÷ 	
ô 	
ùs   ‚/:±8²:c                ó    <€ V ^8„  d   QhRS[ /# r(   )r   )r   r   s   "€r   r   r   L   s   ø€ ÷ ñ ™ñ r   c                ó~   € V P                   R8X  d"   \        \        V 4      P                   R24      hV P                   # )é   z# instance doesn't have valid lengthéÿÿÿÿ)r   Ú	TypeErrorÚtypeÚ__name__r+   s   &r   Ú__len__ÚFileOpenerIterDataPipe.__len__L   s6   € Ø�;‰;˜"ÔÜœt D›z×2Ñ2Ð3Ð3VÐWÓXÐXØ�{‰{Ðr   )r   r   r   r   )r    Nr1   )r4   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r"   r,   r5   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r%   r   s   @@r   r	   r	      s-   ù‡ € ñ÷<"õ "÷2
ð 
÷
÷ ð r   N)Úcollections.abcr   r   Úior   Ú%torch.utils.data.datapipes._decoratorr   Ú#torch.utils.data.datapipes.datapiper   Ú'torch.utils.data.datapipes.utils.commonr   Ú__all__r)   r   r	   © r   r   Ú<module>rE      sQ   ðß .Ý å EÝ <Ý Tð ð€ñ
 �\Ó"ô@˜\¨%°°V°Õ*<Õ=ó @ó #ò@r   