def file_finder(filepath):
    """
    Takes a filepath (str) and exracts: (1) its path, (2) its name, and (3) its extension.
    This metadata is filtered into a dictionary.

    For example, the filepath 'folder/directory/repository/file_name.txt' would return:

        File path: 'folder/directory/repository/'
        File name: 'file_name'
        File extention: '.txt'

    :param: filepath: string of a filepath (from current working directory)

    :returns: dictionary with orginal filepath as well as sorted metadata

    """
    prefix = ""
    file_name = ""
    file_ext = ""

    furthest_dir_index = 0
    extention_index = 0

    if "/" in filepath:
        index_ls = []
        for index,char in enumerate(filepath):
            if char == "/":
                index_ls.append(index)

        furthest_dir_index = max(index_ls)

        path = filepath[:(furthest_dir_index + 1)]



    if "." in filepath:
        for i,c in enumerate(filepath):
            if c == ".":
                extention_index = i
                file_ext = filepath[extention_index:]

        file_name = filepath[(furthest_dir_index + 1):(extention_index)]

    else:
        file_name = filepath[furthest_dir_index:]


    dictionary = {"full_path": filepath, "file_name": file_name,
                  "prefix": prefix, "extention" : file_ext}

    return(dictionary)