
    il                     <    d dl mZ d dlZd dlmZ  G d dee      Zy)    )EnumN)Optionalc                   <    e Zd ZdZdZdZdZdZede	d    fd       Z
y)	FileCacheModea  Enumeration of the modes available for for the cloudpathlib file cache.

    Attributes:
        persistent (str): Cache is not removed by `cloudpathlib`.
        tmp_dir (str): Cache is stored in a
            [`TemporaryDirectory`](https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory)
            which is removed when the Client object is garbage collected (or by the OS at some point if not).
        cloudpath_object (str): Cache for a `CloudPath` object is removed when `__del__` for that object is
            called by Python garbage collection.
        close_file (str): Cache for a `CloudPath` file is removed as soon as the file is closed. Note: you must
            use `CloudPath.open` whenever opening the file for this method to function.

    Modes can be set by passing them to the Client or by setting the `CLOUDPATHLIB_FILE_CACHE_MODE`
    environment variable.

    For more detail, see the [caching documentation page](../../caching).
    
persistenttmp_dircloudpath_object
close_filereturnc                 t    t         j                  j                  dd      j                         }|sy | |      S )zParses the environment variable `CLOUDPATHLIB_FILE_CACHE_MODE` into
        an instance of this Enum.

        Returns:
            FileCacheMode enum value if the env var is defined, else None.
        CLOUDPATHLIB_FILE_CACHE_MODE N)osenvirongetlower)cls
env_strings     c/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/cloudpathlib/enums.pyfrom_environmentzFileCacheMode.from_environment   s2     ZZ^^$BBGMMO
z?"    N)__name__
__module____qualname____doc__r   r   r	   r
   classmethodr   r    r   r   r   r      s<    $ JG)J#/!: # #r   r   )enumr   r   typingr   strr   r   r   r   <module>r!      s     	 &#C &#r   