遍历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
2023-12-05 14:08:16
遍历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
下一篇:musl gcc