+
    %i/                    "   R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^RIHt ^R	IHt ]'       d   ^ R
IHt ]P,                  R8X  d   R R ltM^ RIHt  ! R R]4      t ! R R]]4      tR R ltR R ltR.tR# )zUnix.)annotationsN)ConfigParser)cached_property)Path)
gettempdir)TYPE_CHECKINGNoReturn)XDGMixin)PlatformDirsABC)Iteratorwin32c                   V ^8  d   QhRR/# )   returnr    )formats   "O/var/www/html/photoedit/myenv/lib/python3.14/site-packages/platformdirs/unix.py__annotate__r      s        H      c                     R p \        V 4      h)zshould only be used on Unix)RuntimeError)msgs    r   getuidr      s    +3r   )r   c                     ] tR t^tRt]R R l4       t]R R l4       t]R R l4       t	]R R	 l4       t
]R
 R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R  R! l4       t]R" R# l4       t]R$ R% l4       t]R& R' l4       t]R( R) l4       t]R* R+ l4       t]R, R- l4       t]R. R/ l4       t]R0 R1 l4       t]R2 R3 l4       t]R4 R5 l4       t ]R6 R7 l4       t!R8 R9 lt"R: R; lt#R<t$R=# )>_UnixDefaultszDefault directories for Unix/Linux without XDG environment variable overrides.

The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`.

c                   V ^8  d   QhRR/# )r   r   boolr   )r   s   "r   r   _UnixDefaults.__annotate__%   s     8 84 8r   c                	D    V P                   ;'       d    \        4       ^ 8H  # )    )use_site_for_rootr   selfs   &r   	_use_site_UnixDefaults._use_site$   s    %%77&(a-7r   c                   V ^8  d   QhRR/# r   r   strr   )r   s   "r   r   r   )   s     W Ws Wr   c                ^    V P                  \        P                  P                  R4      4      # )z|:returns: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or ``$XDG_DATA_HOME/$appname/$version``~/.local/share_append_app_name_and_versionospath
expanduserr!   s   &r   user_data_dir_UnixDefaults.user_data_dir(   %     001C1CDT1UVVr   c                   V ^8  d   QhRR/# r   r   z	list[str]r   )r   s   "r   r   r   .   s     x x xr   c                	F    V P                  R 4      V P                  R4      .# /usr/local/sharez
/usr/sharer+   r!   s   &r   _site_data_dirs_UnixDefaults._site_data_dirs-   s%    112DEtGhGhiuGvwwr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   2   s     R R Rr   c                ^    V P                  \        P                  P                  R4      4      # )z{:returns: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or ``$XDG_CONFIG_HOME/$appname/$version``	~/.configr*   r!   s   &r   user_config_dir_UnixDefaults.user_config_dir1   s$     001C1CK1PQQr   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   r   7   s     ? ?9 ?r   c                	&    V P                  R 4      .# )z/etc/xdgr7   r!   s   &r   _site_config_dirs_UnixDefaults._site_config_dirs6   s    11*=>>r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   ;        Q Q Qr   c                ^    V P                  \        P                  P                  R4      4      # )zx:returns: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or ``$XDG_CACHE_HOME/$appname/$version``z~/.cacher*   r!   s   &r   user_cache_dir_UnixDefaults.user_cache_dir:   s$     001C1CJ1OPPr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   @        ? ? ?r   c                $    V P                  R4      # )zP:returns: cache directory shared by users, e.g. ``/var/cache/$appname/$version``z
/var/cacher7   r!   s   &r   site_cache_dir_UnixDefaults.site_cache_dir?   s     00>>r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   E   s     W W Wr   c                ^    V P                  \        P                  P                  R4      4      # )z~:returns: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or ``$XDG_STATE_HOME/$appname/$version``z~/.local/stater*   r!   s   &r   user_state_dir_UnixDefaults.user_state_dirD   r1   r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   J   s     = = =r   c                $    V P                  R4      # )zN:returns: state directory shared by users, e.g. ``/var/lib/$appname/$version``z/var/libr7   r!   s   &r   site_state_dir_UnixDefaults.site_state_dirI   s     00<<r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   O   s      c r   c                    V P                   pV P                  '       d2   \        P                  P	                  VR4      pV P                  V4       V# )zh:returns: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in itlog)rO   opinionr,   r-   join_optionally_create_directoryr"   r-   s   & r   user_log_dir_UnixDefaults.user_log_dirN   s?     ""<<<77<<e,D--d3r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   X   s     = =c =r   c                $    V P                  R4      # )z:returns: log directory shared by users, e.g. ``/var/log/$appname/$version``

Unlike `user_log_dir`, ``opinion`` has no effect since ``/var/log`` is inherently a log directory.

z/var/logr7   r!   s   &r   site_log_dir_UnixDefaults.site_log_dirW   s     00<<r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   a   s     G GC Gr   c                    \        RR4      # )zD:returns: documents directory tied to the user, e.g. ``~/Documents``XDG_DOCUMENTS_DIRz~/Documents_get_user_media_dirr!   s   &r   user_documents_dir _UnixDefaults.user_documents_dir`   s     ##6FFr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   f   s     F FC Fr   c                    \        RR4      # )zD:returns: downloads directory tied to the user, e.g. ``~/Downloads``XDG_DOWNLOAD_DIRz~/Downloadsre   r!   s   &r   user_downloads_dir _UnixDefaults.user_downloads_dire   s     ##5}EEr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   k   s     E E3 Er   c                    \        RR4      # )zB:returns: pictures directory tied to the user, e.g. ``~/Pictures``XDG_PICTURES_DIRz
~/Picturesre   r!   s   &r   user_pictures_dir_UnixDefaults.user_pictures_dirj   s     ##5|DDr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   p   s     A A Ar   c                    \        RR4      # )z>:returns: videos directory tied to the user, e.g. ``~/Videos``XDG_VIDEOS_DIRz~/Videosre   r!   s   &r   user_videos_dir_UnixDefaults.user_videos_diro   s     ##3Z@@r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   u   rI   r   c                    \        RR4      # )z<:returns: music directory tied to the user, e.g. ``~/Music``XDG_MUSIC_DIRz~/Musicre   r!   s   &r   user_music_dir_UnixDefaults.user_music_dirt   s     #?I>>r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r   z   s     C C# Cr   c                    \        RR4      # )z@:returns: desktop directory tied to the user, e.g. ``~/Desktop``XDG_DESKTOP_DIRz	~/Desktopre   r!   s   &r   user_desktop_dir_UnixDefaults.user_desktop_diry   s     ##4kBBr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s     2 2c 2r   c                @    \         P                  P                  R4      # )z?:returns: bin directory tied to the user, e.g. ``~/.local/bin``z~/.local/bin)r,   r-   r.   r!   s   &r   user_bin_dir_UnixDefaults.user_bin_dir~   s     ww!!.11r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s        c  r   c                    R# )z@:returns: bin directory shared by users, e.g. ``/usr/local/bin``z/usr/local/binr   r!   s   &r   site_bin_dir_UnixDefaults.site_bin_dir   s      r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s     R Rs Rr   c                |    \         P                  P                  \         P                  P                  R4      R4      # )zW:returns: applications directory tied to the user, e.g. ``~/.local/share/applications``r)   applications)r,   r-   rY   r.   r!   s   &r   user_applications_dir#_UnixDefaults.user_applications_dir   s)     ww||BGG../?@.QQr   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   r      s     ] ] ]r   c                	l    R Uu. uF#  p\         P                  P                  VR4      NK%  	  up# u upi )r6   r   r5   )r,   r-   rY   )r"   ps   & r   _site_applications_dirs%_UnixDefaults._site_applications_dirs   s+    9[\9[AQ/9[\\\s   )1c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s     D Ds Dr   c                    V P                   pV P                  '       d    \        P                  P	                  V4      # V^ ,          # )zR:returns: applications directory shared by users, e.g. ``/usr/share/applications``)r   	multipathr,   pathseprY   )r"   dirss   & r   site_applications_dir#_UnixDefaults.site_applications_dir   s3     ++(,rzzt$CDGCr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r           7 7# 7r   c                   \         P                  P                  R4      '       d   R\        4        2pM@\         P                  P                  R4      '       d   R\        4        2pMR\        4        2p\        P
                  ! V\        P                  4      '       g   \        4        R\        4        2pV P                  V4      # )aX  :returns: runtime directory tied to the user, e.g. ``$XDG_RUNTIME_DIR/$appname/$version``.

If ``$XDG_RUNTIME_DIR`` is unset, tries the platform default (``/tmp/run/user/$(id -u)`` on OpenBSD, ``/var/run/user/$(id -u)`` on FreeBSD/NetBSD, ``/run/user/$(id -u)`` otherwise). If the default is not writable, falls back to a temporary directory.

openbsdz/tmp/run/user/z/var/run/user/z
/run/user/z	/runtime-)freebsdnetbsd)	sysplatform
startswithr   r,   accessW_OKr   r+   r[   s   & r   user_runtime_dir_UnixDefaults.user_runtime_dir   s     <<""9--#FH:.D\\$$%:;;#FH:.Dz*Dyyrww'' l^9VXJ7D0066r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      r   r   c                x    \         P                  P                  R4      '       d   RpMRpV P                  V4      # )a.  :returns: runtime directory shared by users, e.g. ``/run/$appname/$version`` or ``$XDG_RUNTIME_DIR/$appname/$version``.

Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will fall back to paths associated to the root user instead of a regular logged-in user if it's not set.

If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir` instead.

For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.

z/var/runz/run)r   r   r   )r   r   r   r+   r[   s   & r   site_runtime_dir_UnixDefaults.site_runtime_dir   s5     <<""#CDDDD0066r   c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r      s     I I Ir   c                8    V P                  V P                  4      # )zi:returns: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``) _first_item_as_path_if_multipathsite_data_dirr!   s   &r   site_data_path_UnixDefaults.site_data_path   s     44T5G5GHHr   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s     K K$ Kr   c                8    V P                  V P                  4      # )zg:returns: config path shared by users, returns the first item, even if ``multipath`` is set to ``True``)r   site_config_dirr!   s   &r   site_config_path_UnixDefaults.site_config_path   s     44T5I5IJJr   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s     J J Jr   c                8    V P                  V P                  4      # )zj:returns: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r   rK   r!   s   &r   site_cache_path_UnixDefaults.site_cache_path   s     44T5H5HIIr   c                   V ^8  d   QhRR/# r   r   zIterator[str]r   )r   s   "r   r   r      s     * *- *r   c              #  z   "   V P                   '       g   V P                  x  V P                   Rj  xL
  R#  L5i)z4:yield: all user and site configuration directories.N)r#   r=   rA   r!   s   &r   iter_config_dirs_UnixDefaults.iter_config_dirs   s)     ~~~&&&))))   0;9;c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s     ( ( (r   c              #  z   "   V P                   '       g   V P                  x  V P                   Rj  xL
  R#  L5i)z+:yield: all user and site data directories.N)r#   r/   r8   r!   s   &r   iter_data_dirs_UnixDefaults.iter_data_dirs   s)     ~~~$$$''''r   r   N)%__name__
__module____qualname____firstlineno____doc__r   r#   propertyr/   r8   r=   rA   rF   rK   rO   rS   r\   r`   rg   rl   rq   rv   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r   r   r   r   r      sR    8 8 W W x x R R ? ? Q Q ? ? W W = =   = = G G F F E E A A ? ? C C 2 2     R R ] ] D D
 7 7  7 7  I I K K J J*( (r   r   c                     a  ] tR t^tRt]R V 3R ll4       t]R V 3R ll4       t]R V 3R ll4       t]R V 3R	 ll4       t	]R
 V 3R ll4       t
]R V 3R ll4       t]R V 3R ll4       t]R V 3R ll4       tRtV ;t# )UnixaN  On Unix/Linux, we follow the `XDG Basedir Spec <https://specifications.freedesktop.org/basedir/latest/>`_.

The spec allows overriding directories with environment variables. The examples shown are the default values,
alongside the name of the environment variable that overrides them. Makes use of the `appname
<platformdirs.api.PlatformDirsABC.appname>`, `version <platformdirs.api.PlatformDirsABC.version>`, `multipath
<platformdirs.api.PlatformDirsABC.multipath>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
<platformdirs.api.PlatformDirsABC.ensure_exists>`.

c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   Unix.__annotate__   s     O Os Or   c                T   < V P                   '       d   V P                  # \        SV `  # )zb:returns: data directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   r   superr/   r"   	__class__s   &r   r/   Unix.user_data_dir   s#     &*^^^t!!N9NNr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s     S S Sr   c                T   < V P                   '       d   V P                  # \        SV `  # )zd:returns: config directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   r   r   r=   r   s   &r   r=   Unix.user_config_dir   s#     (,~~~t##R57;RRr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      rD   r   c                T   < V P                   '       d   V P                  # \        SV `  # )zc:returns: cache directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   rK   r   rF   r   s   &r   rF   Unix.user_cache_dir   #     '+nnnt""P%':PPr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      rD   r   c                T   < V P                   '       d   V P                  # \        SV `  # )zc:returns: state directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   rS   r   rO   r   s   &r   rO   Unix.user_state_dir   r   r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r           M Mc Mr   c                T   < V P                   '       d   V P                  # \        SV `  # )za:returns: log directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   r`   r   r\   r   s   &r   r\   Unix.user_log_dir   #     %)NNNt  L8LLr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s     _ _s _r   c                T   < V P                   '       d   V P                  # \        SV `  # )zj:returns: applications directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   r   r   r   r   s   &r   r   Unix.user_applications_dir   s#     .2^^^t))^A^^r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      s     U U# Ur   c                T   < V P                   '       d   V P                  # \        SV `  # )ze:returns: runtime directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   r   r   r   r   s   &r   r   Unix.user_runtime_dir   s#     )-t$$TEG<TTr   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r     r   r   c                T   < V P                   '       d   V P                  # \        SV `  # )za:returns: bin directory tied to the user, or site equivalent when root with ``use_site_for_root``)r#   r   r   r   r   s   &r   r   Unix.user_bin_dir  r   r   r   )r   r   r   r   r   r   r/   r=   rF   rO   r\   r   r   r   r   __classcell__)r   s   @r   r   r      s     O O S S Q Q Q Q M M _ _ U U M Mr   r   c               $    V ^8  d   QhRRRRRR/# )r   env_varr'   fallback_tilde_pathr   r   )r   s   "r   r   r   	  s!     3 3 33 33 3r   c                j    \        V 4      ;p'       d   V# \        P                  P                  V4      # )N)_get_user_dirs_folderr,   r-   r.   )r   r   	media_dirs   && r   rf   rf   	  s.    )'22y277122r   c                    V ^8  d   QhRRRR/# )r   keyr'   r   z
str | Noner   )r   s   "r   r   r     s      s z r   c                z   \         P                  P                  RR4      P                  4       ;'       g     \         P                  P                  R4      p\        V4      R,          pVP                  4       '       d   \        4       pVP                  4       ;_uu_ 4       pVP                  RVP                  4        24       RRR4       WR,          9  d   R# VR,          V ,          P                  R4      pVP                  R	\         P                  P                  R
4      4      # R#   + '       g   i     Lo; i)znReturn directory from user-dirs.dirs config file.

See https://freedesktop.org/wiki/Software/xdg-user-dirs/.

XDG_CONFIG_HOME r<   zuser-dirs.dirsz[top]
Ntop"z$HOME~)r,   environgetstripr-   r.   r   existsr   openread_stringreadreplace)r   config_homeuser_dirs_config_pathparserstreamr-   s   &     r   r   r     s     **..!2B7==?bb277CUCUVaCbK -0@@##%%"''))V89 * Um#e}S!'',||GRWW%7%7%<== *)s    #D**D:	)r   
__future__r   r,   r   configparserr   	functoolsr   pathlibr   tempfiler   typingr   r   _xdgr	   apir
   collections.abcr   r   r   r   r   rf   r   __all__r   r   r   <module>r     sx     " 	 
 % %   *   (<<7 
 u(O u(p1M8] 1Mh30 r   