遍历mac系统访达文件时候要注意了

遍历mac系统访达文件时候要注意了,每个文件夹会多出来一个隐藏文件.DS_Store,是用来储存文件夹配置信息的

import os
a,*b = os.walk(root_path) # a--> (root_path, children dirnames, children files)
files = a[-1]

for file in files:
	if file == '.DS_Store':
		continue
posted @ 2020-06-20 19:45  Bravo_Jack  阅读(261)  评论(0编辑  收藏  举报