
    %e?                     >    d dl Z d dlZd dlmZ  G d de          ZdS )    N)utilc                   0    e Zd ZdZd ZdefdZd Zd ZdS )TemporaryDirectorya  Temporary directory context manager.

    Creates a temporary directory that exists within the context manager scope.
    It returns the path to the created directory.
    Wrapper on top of tempfile.mkdtemp.

    Parameters
    ----------
    suffix : str or None
        Suffix to the filename.
    prefix : str or None
        Prefix to the filename.
    dir : str or None
        Enclosing directory.

    c                 "    || _         || _        d S N)_args_kwargs)selfargskwargss      =lib/python3.11/site-packages/streamlit/temporary_directory.py__init__zTemporaryDirectory.__init__*   s    
    returnc                 *    t          j        |           S r   )r   repr_r
   s    r   __repr__zTemporaryDirectory.__repr__.   s    z$r   c                 P    t          j        | j        i | j        | _        | j        S r   )tempfilemkdtempr   r	   _pathr   s    r   	__enter__zTemporaryDirectory.__enter__1   s%    %tzBT\BB
zr   c                 8    t          j        | j                   d S r   )shutilrmtreer   )r
   exc_type	exc_valueexc_tracebacks       r   __exit__zTemporaryDirectory.__exit__5   s    dj!!!!!r   N)	__name__
__module____qualname____doc__r   strr   r   r     r   r   r   r      sf         "   #          " " " " "r   r   )r   r   	streamlitr   objectr   r&   r   r   <module>r)      s_           " " " " " " " " " "r   