(root_path, rel_path)
return "/".join(verified_path_elements), True
Given a valid root path and an unverified relative path out from that root
    path, searches to see if the full path exists. This search is case insensitive,
    but the returned relative path is cased accurately if it is found.
    returns a tuple of (rel_path, exists)
Given a valid root path and an unverified relative path out from that root
    path, searches to see if the full path exists. This search is case insensitive,
    but the returned relative path is cased accurately if it is found.
    returns a tuple of (rel_path, exists)
Given a valid root path and an unverified relative path out from that root path searches to see if the full path exists . This search is case insensitive but the returned relative path is cased accurately if it is found . returns a tuple of ( rel_path exists )
def get_verified_path(root_path, rel_path):
    """
    Given a valid root path and an unverified relative path out from that root
    path, searches to see if the full path exists. This search is case insensitive,
    but the returned relative path is cased accurately if it is found.
    returns a tuple of (rel_path, exists)
    """
    normalized_root_path = normalize_path(root_path)
    rel_path_elements = normalize_path(rel_path).split("/")
    verified_path_elements = []

    for elem in rel_path_elements:
        dir_map = {
            f.lower(): f
            for f in os.listdir(
                normalized_root_path + "/" + "/".join(verified_path_elements)
            )
        }
        if elem.lower() not in dir_map:
            return rel_path, False
        verified_path_elements.append(dir_map[elem.lower()])

    return "/".join(verified_path_elements), True
def get_verified_path ( root_path , rel_path ) : normalized_root_path = normalize_path ( root_path ) rel_path_elements = normalize_path ( rel_path ) . split ( "/" ) verified_path_elements = [ ] for elem in rel_path_elements : dir_map = { f . lower ( ) : f for f in os . listdir ( normalized_root_path + "/" + "/" . join ( verified_path_elements ) ) } if elem . lower ( ) not in dir_map : return rel_path , False verified_path_elements . append ( dir_map [ elem . lower ( ) ] ) return "/" . join ( verified_path_elements ) , True