관리-도구
편집 파일: unix.cpython-38.pyc
U )�e_) � @ s� d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl m Z ddlmZ ej d krjd d�dd �ZnddlmZ G dd� de�Zdddd�dd�Zddd�dd�ZdgZdS )zUnix.� )�annotationsN)�ConfigParser)�Path)�Iterator� )�PlatformDirsABC�win32�int��returnc C s d} t | ��d S )Nzshould only be used on Unix)�RuntimeError)�msg� r �?/opt/hc_python/lib/python3.8/site-packages/platformdirs/unix.py�getuid s r )r c @ s� e Zd ZdZedd�dd��Zedd�dd��Zedd�d d ��Zedd�dd��Zedd�d d��Z edd�dd��Z edd�dd��Zedd�dd��Zedd�dd��Z edd�dd��Zedd�dd��Zedd�dd��Zedd�dd��Zedd�dd ��Zedd�d!d"��Zedd�d#d$��Zedd�d%d&��Zedd�d'd(��Zed)d�d*d+��Zed)d�d,d-��Zed)d�d.d/��Zdd)d0�d1d2�Zd3d�d4d5�Zd3d�d6d7�Zd8S )9�Unixa� On Unix/Linux, we follow the `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows overriding directories with environment variables. The examples show 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>`. �strr c C s, t j�dd�}|�� s"t j�d�}| �|�S )z� :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or ``$XDG_DATA_HOME/$appname/$version`` � XDG_DATA_HOME� z~/.local/share��os�environ�get�strip�path� expanduser�_append_app_name_and_version��selfr r r r � user_data_dir$ s zUnix.user_data_dirz list[str]c s>