def list_path(root_dir):
    """List directory if exists.
    :param dir: str
    :return: list
    """
    res = []
    if os.path.isdir(root_dir):
        for name in os.listdir(root_dir):
            res.append(name)
    return res