MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetSubDirList

Function GetSubDirList

tools/create_makefile.py:173–189  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

171 clean_dir.append("%s/%s" % (sbin_path, target_name))
172
173def GetSubDirList(path):
174 sub_dir_list=[]
175 if(os.path.exists("%s/src_list" % path)):
176 sub_dir_file=open("%s/src_list" % path)
177 lines = sub_dir_file.readlines()
178 for sub_dir in lines:
179 if(sub_dir[0]=='\n'):
180 continue;
181 sub_dir_list+=sub_dir.strip().split(' ')
182 sub_dir_file.close()
183 else:
184 sub_dir=os.listdir(path)
185 for dir in sub_dir:
186 if(dir.find("sk")==-1):
187 if( os.path.isdir( "%s/%s" % ( path, dir ) ) and dir[0] != "." ):
188 sub_dir_list.append( dir )
189 return sub_dir_list
190
191def PrintMakeAllSubDir(dir_list):
192

Callers 1

CreateMakeFileFunction · 0.85

Calls 2

closeMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected