관리-도구
편집 파일: api.cpython-38.pyc
U &?�f$# � @ sh d Z ddlmZ ddlZddlmZmZ ddlmZ ddl m Z e rTddl mZmZ G dd � d e�Z dS ) z Base API.� )�annotationsN)�ABC�abstractmethod)�Path)� TYPE_CHECKING)�Iterator�Literalc @ s> e Zd ZdZdgddddddddd �d d�Zddd �dd�Zddd�dd�Zeedd�dd���Z eedd�dd���Z eedd�dd���Zeedd�dd���Zeedd�dd���Z eedd�dd���Zeedd�d d!���Zeedd�d"d#���Zeedd�d$d%���Zeedd�d&d'���Zeedd�d(d)���Zeedd�d*d+���Zeedd�d,d-���Zeedd�d.d/���Zeedd�d0d1���Zeedd�d2d3���Zed4d�d5d6��Zed4d�d7d8��Zed4d�d9d:��Zed4d�d;d<��Zed4d�d=d>��Zed4d�d?d@��Zed4d�dAdB��Zed4d�dCdD��Z ed4d�dEdF��Z!ed4d�dGdH��Z"ed4d�dIdJ��Z#ed4d�dKdL��Z$ed4d�dMdN��Z%ed4d�dOdP��Z&ed4d�dQdR��Z'ed4d�dSdT��Z(dUd�dVdW�Z)dUd�dXdY�Z*dUd�dZd[�Z+dUd�d\d]�Z,d^d�d_d`�Z-d^d�dadb�Z.d^d�dcdd�Z/d^d�dedf�Z0dS )h�PlatformDirsABCz-Abstract base class for platform directories.NFTz str | Nonezstr | None | Literal[False]�bool�None)�appname� appauthor�version�roaming� multipath�opinion� ensure_exists�returnc C s. || _ || _|| _|| _|| _|| _|| _dS )aY Create a new platform directory. :param appname: See `appname`. :param appauthor: See `appauthor`. :param version: See `version`. :param roaming: See `roaming`. :param multipath: See `multipath`. :param opinion: See `opinion`. :param ensure_exists: See `ensure_exists`. N)r r r r r r r )�selfr r r r r r r � r �J/opt/hc_python/lib/python3.8/site-packages/pip/_vendor/platformdirs/api.py�__init__ s zPlatformDirsABC.__init__�str)�baser c G sX t |dd � �}| jr4|�| j� | jr4|�| j� tjj|d f|�� }| �|� |S )N� r )�listr �appendr �os�path�join�_optionally_create_directory)r r �paramsr r r r �_append_app_name_and_versionP s z,PlatformDirsABC._append_app_name_and_version)r r c C s | j rt|�jddd� d S )NT)�parents�exist_ok)r r �mkdir�r r r r r r Z s z,PlatformDirsABC._optionally_create_directory)r c C s dS )z(:return: data directory tied to the userNr �r r r r � user_data_dir^ s zPlatformDirsABC.user_data_dirc C s dS )z':return: data directory shared by usersNr r'