%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/certbot/plugins/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/certbot/plugins/__pycache__/util.cpython-312.pyc |
� M/�e � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ej e� Zde dee fd �Zd e defd�Zy)zPlugin utilities.� N)�List)�util)�os)�STANDARD_BINARY_DIRS�path�returnc �� � t j j | � }g }|rA|j |� t j j |� \ }}||d k( r |S |r�A|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 sb � � �W�W� � �d� #�F��H� �������G�G�M�M�&�)� ����X�b�\�!���O� � �O� �cmdc � � t j d }g }t D ]. }||vs�|t j |z z }|j |� �0 t |� rGt j d| t j j |� � |t j d<