def scan_archive_struct_stninfo(self,rootdir):
# same as scan archive struct but looks for station info files
self.archiveroot = rootdir
stninfo = []
path2stninfo = []
for path, dirs, files in scandir.walk(rootdir):
for file in files:
if file.endswith(".info"):
# only add valid rinex compressed files
stninfo.append(os.path.join(path,file).rsplit(rootdir+'/')[1])
path2stninfo.append(os.path.join(path,file))
else:
if file.endswith('DS_Store') or file[0:2] == '._':
# delete the stupid mac files
try:
os.remove(os.path.join(path, file))
except:
sys.exc_clear()
return stninfo,path2stninfo
评论列表
文章目录