MCPcopy Create free account
hub / github.com/Kuangcp/Note / listFiles

Function listFiles

create_tree.py:45–57  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

43
44# 列出所有文件的列表 并排好序
45def listFiles(name):
46 lists = []
47 dir_list = []
48 temp = os.listdir(name)
49 temp.sort()
50 for r in temp:
51 if(not os.path.isdir(name+'/'+r)):
52 lists.append(r)
53 else:
54 dir_list.append(r)
55 lists.sort()
56 lists = dir_list + lists
57 return lists
58
59# 处理文件
60def handlerFile(name, count, path):

Callers 1

readFolderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected