File: //lib/python3.6/site-packages/certbot/plugins/__pycache__/util.cpython-36.pyc
3
ߦ)_� � @ sN d Z ddlZddlmZ ddlmZ ddlmZ eje �Z
dd� Zdd � ZdS )
zPlugin utilities.� N)�util)�os)�STANDARD_BINARY_DIRSc C sF t jj| �}g }x0|r@|j|� t jj|�\}}||d krP qW |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 �path�normpath�append�split)r �prefix�prefixes�_� r �/usr/lib/python3.6/util.py�get_prefixes s
r c C s� t jd }g }x,tD ]$}||kr|t j| 7 }|j|� qW t|�rdtjd| t jj|�� |t jd<