File: //usr/local/lib/python3.10/dist-packages/pip/_internal/utils/__pycache__/filesystem.cpython-310.pyc
o
��h| � @ s d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl m
Z
d dlmZ d dl
mZmZmZ d dlmZ d dlmZ d d lmZ d)dd�Ze
d*dd��Zeddd�ej�Zd)dd�Zd)dd�Zd+dd�Zd,d!d"�Zd-d#d$�Zd,d%d&�Zd-d'd(�Z dS ).� )�annotationsN)� Generator)�contextmanager)�NamedTemporaryFile)�Any�BinaryIO�cast)�get_path_uid)�format_size)�retry�path�str�return�boolc C s� t jdks
ttd�sdS tj�| �sJ �d }| |krNtj�| �rAt�� dkr:z t| �}W |dkS t y9 Y dS w t�
| tj�S | tj�| �}} | |ksdS )N�win32�geteuidTr F)
�sys�platform�hasattr�osr �isabs�lexistsr r �OSError�access�W_OK�dirname)r �previous�path_uid� r �I/usr/local/lib/python3.10/dist-packages/pip/_internal/utils/filesystem.py�check_path_owner s"