find out, if path1 is a file, or a directory (or unknown).

def compare_path_strings(path1, path2, path_sep='/'):
    """
    find out, if path1 is a file, or a directory (or unknown).
    """
    if len(path2) < len(path1):
        return 0
    if path1 == path2:
        return ISFILE
    else:
        p1_parts = path1.split(path_sep)
        p2_parts = path2.split(path_sep)
        if len(p2_parts) < len(p1_parts):
            return 0
        else:
            return compare_parts(p1_parts, p2_parts)