/
lib
/
python3
/
dist-packages
/
certbot
/
plugins
/
__pycache__
/
Upload File
HOME
� E��c � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ej e� � Zde dee fd �Zd e defd�ZdS )zPlugin utilities.� N)�List)�util)�os)�STANDARD_BINARY_DIRS�path�returnc �� � t j � | � � }g }|rF|� |� � t j � |� � \ }}||d k rn|�F|S )a� Retrieves all possible path prefixes of a path, in descending order of length. For instance: * (Linux) `/a/b/c` returns `['/a/b/c', '/a/b', '/a', '/']` * (Windows) `C:\a\b\c` returns `['C:\a\b\c', 'C:\a\b', 'C:\a', 'C:']` :param str path: the path to break into prefixes :returns: all possible path prefixes of given path in descending order :rtype: `list` of `str` ���)r r �normpath�append�split)r �prefix�prefixes�_s �6/usr/lib/python3/dist-packages/certbot/plugins/util.py�get_prefixesr sr � � �W� � �d� #� #�F��H� � ���������G�M�M�&�)�)� ����X�b�\�!�!�� � � �O� �cmdc �� � t j d }g }t D ]-}||vr'|t j |z z }|� |� � �.t |� � rHt � d| t j � |� � � � |t j d<