def remove_enclosing_dirs(full_path):
    """ Remove any directories in a filepath

    If you pass a filename to this function, meaning it doesn't
    contain the "/" string, it will simply return the input back to you.

    Args:
        full_path (str): a Unix-based path to a file (with extension)

    Returns:
        filename (string): just the filename (with extension) from the path

    """

    if full_path.find("/") != -1:
        filename = full_path.split("/")[-1]
        return filename

    elif full_path.find("/") == -1:
        filename = full_path
        print(" ".join(["Your path", full_path, "is already a filename."]))
        return filename

    else:
        print("Something went wrong. Your path isn't a path or a filename.")