扫描目录下的所有文件并返回文件的绝对路径
def fileListFunc(filePathList): fileList = [] for filePath in filePathList: for top, dirs, nondirs in os.walk(filePath): for item in nondirs: fileList.append(os.path.join(top, item)) return fileList
原文地址:https://www.cnblogs.com/djoker/p/8203631.html
时间: 2024-10-31 17:34:50