o
    RD©iU  ã                   @  sl   d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 G dd„ deƒZ
dd	d
„ZG dd„ dƒZdS )é    )ÚannotationsN)Úcached_property)ÚProtocol)ÚPlatformDirsc                   @  s   e Zd Zeddd„ƒZdS )ÚPlatformDirsProtoÚreturnúpathlib.Pathc                 C  s   d S ©N© ©Úselfr
   r
   úT/var/www/Datamplify/venv/lib/python3.10/site-packages/snowflake/connector/sf_dirs.pyÚuser_config_path   s   z"PlatformDirsProto.user_config_pathN)r   r   )Ú__name__Ú
__module__Ú__qualname__Úpropertyr   r
   r
   r
   r   r      s    r   r   c                  C  sL   dddœ} t  tj dd¡¡ ¡ }| ¡ rtt|ƒfi | ¤ŽS t	di | ¤ŽS )ab  Decide on what PlatformDirs class to use.

    In case a folder exists (which can be customized with the environmental
    variable `SNOWFLAKE_HOME`) we use that directory as all platform
    directories. If this folder does not exist we'll fall back to platformdirs
    defaults.

    This helper function was introduced to make this code testable.
    Ú	snowflakeF)ÚappnameÚ	appauthorÚSNOWFLAKE_HOMEz~/.snowflake/Nr
   )
ÚpathlibÚPathÚosÚenvironÚgetÚ
expanduserÚexistsÚSFPlatformDirsÚstrr   )Úplatformdir_kwargsÚsnowflake_homer
   r
   r   Ú_resolve_platform_dirs   s   þÿþÿþ	r"   c                   @  s(   e Zd ZdZddd„Zeddd	„ƒZd
S )r   zÉSingle folder platformdirs.

    This class introduces a PlatformDir class where everything is placed into a
    single folder. This is intended for users who prefer portability over all
    else.
    Ú
single_dirr   r   ÚNonec                 K  s   t  |¡| _d S r	   )r   r   r#   )r   r#   Úkwargsr
   r
   r   Ú__init__6   s   zSFPlatformDirs.__init__c                 C  s   | j S )z"data directory tied to to the user)r#   r   r
   r
   r   r   =   s   zSFPlatformDirs.user_config_pathN)r#   r   r   r$   )r   r   )r   r   r   Ú__doc__r&   r   r   r
   r
   r
   r   r   .   s
    
r   )r   r   )Ú
__future__r   r   r   Ú	functoolsr   Útypingr   Úplatformdirsr   r   r"   r   r
   r
   r
   r   Ú<module>   s    
