403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.73
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/xdg/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/xdg/__pycache__/BaseDirectory.cpython-311.pyc
�

�u�cu��(�dZddlZddlZej�d��Zej�d��pej�edd��Z	e	gej�d��pd�
d	��zZej�d
��pej�ed��Zegej�d��pd
�
d	��zZ
ej�d��pej�ed��Zej�d��pej�edd��Zd�eD��Zd�e
D��Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�ZdS)a
This module is based on a rox module (LGPL):

http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/basedir.py?rev=1.9&view=log

The freedesktop.org Base Directory specification provides a way for
applications to locate shared data and configuration:

    http://standards.freedesktop.org/basedir-spec/

(based on version 0.6)

This module can be used to load and save from and to these directories.

Typical usage:

    from rox import basedir
    
    for dir in basedir.load_config_paths('mydomain.org', 'MyProg', 'Options'):
        print "Load settings from", dir

    dir = basedir.save_config_path('mydomain.org', 'MyProg')
    print >>file(os.path.join(dir, 'Options'), 'w'), "foo=2"

Note: see the rox.Options module for a higher-level API for managing options.
�N�~�
XDG_DATA_HOMEz.local�share�
XDG_DATA_DIRSz/usr/local/share:/usr/share�:�XDG_CONFIG_HOMEz.config�XDG_CONFIG_DIRSz/etc/xdg�XDG_CACHE_HOMEz.cache�XDG_STATE_HOME�statec��g|]}|�|��S�r��.0�xs  �3/usr/lib/python3/dist-packages/xdg/BaseDirectory.py�
<listcomp>r1s��/�/�/�q�Q�/��/�/�/�c��g|]}|�|��Srrrs  rrr2s��3�3�3���3�1�3�3�3rc��tjj|�}|�d��rJ�tj�t|��}tj�|��stj|d��|S)z�Ensure ``$XDG_CONFIG_HOME/<resource>/`` exists, and return its path.
    'resource' should normally be the name of your application. Use this
    when saving configuration settings.
    �/�)�os�path�join�
startswith�xdg_config_home�isdir�makedirs��resourcers  r�save_config_pathr"4sn��
�w�|�X�&�H��"�"�3�'�'�'�'�'�
�7�<�<���2�2�D�
�7�=�=����!�
��D�%� � � ��Krc�
�tjj|�}|�d��rJ�tj�t|��}tj�|��stj|��|S)z�Ensure ``$XDG_DATA_HOME/<resource>/`` exists, and return its path.
    'resource' should normally be the name of your application or a shared
    resource. Use this when saving or updating application data.
    r)rrrr�
xdg_data_homerrr s  r�save_data_pathr%@sl��
�w�|�X�&�H��"�"�3�'�'�'�'�'�
�7�<�<�
�x�0�0�D�
�7�=�=�����
��D�����Krc�
�tjj|�}|�d��rJ�tj�t|��}tj�|��stj|��|S)z�Ensure ``$XDG_CACHE_HOME/<resource>/`` exists, and return its path.
    'resource' should normally be the name of your application or a shared
    resource.r)rrrr�xdg_cache_homerrr s  r�save_cache_pathr(L�l���w�|�X�&�H��"�"�3�'�'�'�'�'�
�7�<�<���1�1�D�
�7�=�=�����
��D�����Krc�
�tjj|�}|�d��rJ�tj�t|��}tj�|��stj|��|S)z�Ensure ``$XDG_STATE_HOME/<resource>/`` exists, and return its path.
    'resource' should normally be the name of your application or a shared
    resource.r)rrrr�xdg_state_homerrr s  r�save_state_pathr,Wr)rc'��K�tjj|�}tD]E}tj�||��}tj�|��r|V��FdS)z�Returns an iterator which gives each directory named 'resource' in the
    configuration search path. Information provided by earlier directories should
    take precedence over later ones, and the user-specific config dir comes
    first.N)rrr�xdg_config_dirs�exists)r!�
config_dirrs   r�load_config_pathsr1bsa����
�w�|�X�&�H�%�,�,�
��w�|�|�J��1�1��
�7�>�>�$���+�t�����,�,rc�$�t|�D]}|cSdS)zYReturns the first result from load_config_paths, or None if there is nothing
    to load.N)r1)r!rs  r�load_first_configr3ls&����
)���������4rc'��K�tjj|�}tD]E}tj�||��}tj�|��r|V��FdS)z�Returns an iterator which gives each directory named 'resource' in the
    application data search path. Information provided by earlier directories
    should take precedence over later ones.N)rrr�
xdg_data_dirsr/)r!�data_dirrs   r�load_data_pathsr7ssa�����w�|�X�&�H�!�,�,���w�|�|�H�h�/�/��
�7�>�>�$���+�t�����,�,rTc�L�	tjdS#t$�r|r�ddl}d|���z}d}	tj|��}t
j|j��stj	|��d}n�|j
tj��ks!|jtjtj
zzrtj|��d}n/#t$r"}ddl}|j|jkrd}n�Yd}~nd}~wwxYw|rtj|d��|cYSwxYw)aReturns the value of $XDG_RUNTIME_DIR, a directory path.
    
    This directory is intended for 'user-specific non-essential runtime files
    and other file objects (such as sockets, named pipes, ...)', and
    'communication and synchronization purposes'.
    
    As of late 2012, only quite new systems set $XDG_RUNTIME_DIR. If it is not
    set, with ``strict=True`` (the default), a KeyError is raised. With 
    ``strict=False``, PyXDG will create a fallback under /tmp for the current
    user. This fallback does *not* provide the same guarantees as the
    specification requires for the runtime directory.
    
    The strict default is deliberately conservative, so that application
    developers can make a conscious decision to allow the fallback.
    �XDG_RUNTIME_DIRrNz /tmp/pyxdg-runtime-dir-fallback-FTr)r�environ�KeyError�getpass�getuser�lstat�stat�S_ISDIR�st_mode�unlink�st_uid�getuid�S_IRWXG�S_IRWXO�rmdir�OSError�errno�ENOENT�mkdir)�strictr<�fallback�create�st�erIs       r�get_runtime_dirrQ|sW�� "��z�+�,�,��� � � ��	������5����8I�8I�I����	���(�#�#�B��<��
�+�+�
��	�(�#�#�#�����)�r�y�{�{�*�*��*���t�|� ;�<�+����"�"�"������	�	�	��L�L�L��w�%�,�&�&��������������	����"�	&��H�X�u�%�%�%�����A ���s:��+D#�C�BD#�
D�"C?�:D#�?D�D#�"D#)T)�__doc__rr?r�
expanduser�_homer:�getrr$�splitr5rr.r'r+r"r%r(r,r1r3r7rQrrr�<module>rWs����6��������
����3�����
����/�/�3��G�L�L���'�2�2�����Z�^�^�O�$�$�E�(E�L�L�S�Q�Q�R�
��*�.�.�!2�3�3�+��G�L�L��	�*�*��#�#��Z�^�^�%�&�&�4�*�;�;�C�@�@�A������ 0�1�1�*��G�L�L���)�)������ 0�1�1�3��G�L�L���'�2�2��0�/�M�/�/�/�
�3�3�o�3�3�3��
�
�
�
�
�
�	�	�	�	�	�	�,�,�,����,�,�,�2�2�2�2�2�2r

Youez - 2016 - github.com/yon3zu
LinuXploit