def listdir(path, list_name):
"""get cc"""
for file in os.listdir(path):
file_path = os.path.join(path, file)
if os.path.isdir(file_path):
listdir(file_path, list_name)
elif os.path.splitext(file_path)[1]=='.cc':
list_name.append(file_path)
循环获取路径下所有文件
最新推荐文章于 2024-04-18 02:43:59 发布