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