403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/xdg/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/xdg/__pycache__/BaseDirectory.cpython-310.pyc
o

�)Xw�@sdZddlZddlZej�d�Zej�d�pej�edd�Z	e	gej�d�p'd�
d	�Zej�d
�p8ej�ed�Zegej�d�pBd
�
d	�Z
ej�d�pSej�ed�Zdd�eD�Zdd�e
D�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd"d d!�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.cachecC�g|]}|r|�qS�r��.0�xrr�3/usr/lib/python3/dist-packages/xdg/BaseDirectory.py�
<listcomp>.�rcCr
rrrrrrr/rcGsDtjj|�}|�d�r
J�tj�t|�}tj�|�s t�|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��resourcerrrr�save_config_path1srcG�Btjj|�}|�d�r
J�tj�t|�}tj�|�st�|�|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_homerrrrrr�save_data_path=s
r cGr)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_homerrrrrr�save_cache_pathIs
r"cg�<�tjj|�}tD]}tj�||�}tj�|�r|Vq	dS)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_dirrrrr�load_config_pathsTs���r'cGst|�D]}|SdS)zYReturns the first result from load_config_paths, or None if there is nothing
    to load.N)r')rrrrr�load_first_config^sr(cgr#)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_dirrrrr�load_data_pathses���r+Tc
Cs�ztjdWStyu|r�ddl}d|��}d}zt�|�}Wn tyC}zddl}|j|jkr8d}n�WYd}~n*d}~wwt	�
|j�sRt�|�d}n|j
t��ksb|jt	jt	jB@rit�|�d}|rqt�|d�|YSw)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�OSError�errno�ENOENT�stat�S_ISDIR�st_mode�unlink�st_uid�getuid�S_IRWXG�S_IRWXO�rmdir�mkdir)�strictr/�fallback�create�st�er3rrr�get_runtime_dirns<���
�
�rD)T)�__doc__rr5r�
expanduser�_homer-�getrr�splitr)rr$r!rr r"r'r(r+rDrrrr�<module>s6�����
	

Youez - 2016 - github.com/yon3zu
LinuXploit