generic/py-backend/fs_utils/list_dir.py
def _same_dir_file_comparator(a_file, b_file):
    """
    Cmp function for files within the same dir.
    Sorts directories first.
    """
    if a_file["is_dir"] and not b_file["is_dir"]:
        return -1
    if not a_file["is_dir"] and b_file["is_dir"]:
        return 1
    return _filename_comparator(a_file["name"], b_file["name"])

    Cmp function for files within the same dir.
    Sorts directories first.
    
Cmp function for files within the same dir.
Sorts directories first.
Cmp function for files within the same dir . Sorts directories first .
def _same_dir_file_comparator(a_file, b_file):
    if a_file["is_dir"] and not b_file["is_dir"]:
        return -1
    if not a_file["is_dir"] and b_file["is_dir"]:
        return 1
    return _filename_comparator(a_file["name"], b_file["name"])
def _same_dir_file_comparator ( a_file , b_file ) : if a_file [ "is_dir" ] and not b_file [ "is_dir" ] : return - 1 if not a_file [ "is_dir" ] and b_file [ "is_dir" ] : return 1 return _filename_comparator ( a_file [ "name" ] , b_file [ "name" ] )
Cmp function for files within the same dir.
Cmp function for files within the same dir .
"""
    Cmp function for files within the same dir.
    Sorts directories first.
    """
a_file
b_file