Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
byp
/
izo
/
con7ext_sym404
/
rintoar.txt
/
usr
/
lib
/
python3.6
/
site-packages
/
certbot
/
plugins
/
__pycache__
:
util.cpython-36.pyc
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
3 گa � @ sn d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ej e�Ze ee d�dd �Ze ed �dd�ZdS ) zPlugin utilities.� N)�List)�util)�os)�STANDARD_BINARY_DIRS)�path�returnc 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 r �normpath�append�split)r �prefix�prefixes�_� r �/usr/lib/python3.6/util.py�get_prefixes s r )�cmdr c C s� t jd }g }x,tD ]$}||kr|t j| 7 }|j|� qW t|�rdtjd| t jj|�� |t jd<