def METHOD_NAME(
    path: Path,
    settings: Settings,
    path_mapping: t.Dict[Path, models.FileType],
) -> models.File:
    """Get a file, including its contents."""
    file_path = settings.project_path / path
    with open(file_path) as f:
        content = f.read()
    return models.File(
        name=path.name,
        path=str(path),
        content=content,
        type=path_mapping.get(path),
    )