
    ɯeiU                    v    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e      Z
ddZ G d	 d
      Zy)    )annotationsN)cached_property)Protocol)PlatformDirsc                      e Zd Zedd       Zy)PlatformDirsProtoc                     y N selfs    ]/var/www/html/glpi_dashboard/venv/lib/python3.12/site-packages/snowflake/connector/sf_dirs.pyuser_config_pathz"PlatformDirsProto.user_config_path   s    03    N)returnzpathlib.Path)__name__
__module____qualname__propertyr   r   r   r   r   r      s    3 3r   r   c                     ddd} t        j                  t        j                  j	                  dd            j                         }|j                         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/r   )
pathlibPathosenvironget
expanduserexistsSFPlatformDirsstrr   )platformdir_kwargssnowflake_homes     r   _resolve_platform_dirsr&      s{      \\


'9jl  
 
 	
 1011r   c                  2    e Zd ZdZ	 	 	 	 ddZedd       Zy)r"   zSingle 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.
    c                8    t        j                  |      | _        y r
   )r   r   
single_dir)r   r)   kwargss      r   __init__zSFPlatformDirs.__init__6   s    
 ",,z2r   c                    | j                   S )z"data directory tied to to the user)r)   r   s    r   r   zSFPlatformDirs.user_config_path=   s     r   N)r)   r#   r   None)r   r#   )r   r   r   __doc__r+   r   r   r   r   r   r"   r"   .   s2    33 
	3  r   r"   )r   r   )
__future__r   r   r   	functoolsr   typingr   platformdirsr   r   r&   r"   r   r   r   <module>r3      s2    " 	  %  %4 4
2< r   