点击(此处)折叠或打开
-
def loadingYamlFile(self, pathstr: str) -> str:
-
oldcurpath = self.curpath
-
if self.level == 0:
-
self.curpath = self.targetpath
-
else:
-
self.curpath = self.curpath + "\\" + pathstr
-
files = os.listdir(self.curpath)
-
for f in files:
-
if os.path.isdir(self.curpath + "\\" + f):
-
if f[0] == ".":
-
pass
-
else:
-
self.level = self.level + 1
-
self.curpath = self.loadingYamlFile(f)
-
-
if os.path.isfile(self.curpath + "\\" + f) and "yaml" in f:
-
filename = self.curpath + "\\" + f
-
self.yamlfilelist.append(filename)
- return oldcurpath