from typing import Union
from pathlib import Path


def read_file(path: Union[Path, str]):
    """[open file directory]

    Args:
        path (Union[Path, str]): [file directory]

    Returns:
        [str]: [returns file contents]
    """
    with open(path) as f:
        return f.readlines()