pgcontents/api_utils.py
def prefix_dirs(path):
    """
    Return an iterable of all prefix directories of path, descending from root.
    """
    _dirname = posixpath.dirname
    path = path.strip('/')
    out = []
    while path != '':
        path = _dirname(path)
        out.append(path)
    return reversed(out)
def prefix_dirs(path):
    """
    Return an iterable of all prefix directories of path, descending from root.
    """
    _dirname = posixpath.dirname
    path = path.strip('/')
    out = []
    while path != '':
        path = _dirname(path)
        out.append(path)
    return reversed(out)
Return an iterable of all prefix directories of path, descending from root.