MCPcopy Create free account
hub / github.com/ActiveState/code / listdir

Function listdir

recipes/Python/577091_Windows_TREE_Emulator/recipe-577091.py:40–50  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

38 walk(path, dirs, files, walk_prefix)
39
40def listdir(path):
41 dirs, files, links = [], [], []
42 for name in os.listdir(path):
43 path_name = os.path.join(path, name)
44 if os.path.isdir(path_name):
45 dirs.append(name)
46 elif os.path.isfile(path_name):
47 files.append(name)
48 elif os.path.islink(path_name):
49 links.append(name)
50 return dirs, files, links
51
52def enumerate2(sequence):
53 length = len(sequence)

Callers 15

count_filesFunction · 0.85
recipe-578858.pyFile · 0.85
resizeFunction · 0.85
file_matchesMethod · 0.85
treeFunction · 0.85
get_file_pathsFunction · 0.85
copy_dirFunction · 0.85
treeFunction · 0.85
walkFunction · 0.85
cleanpycsFunction · 0.85
walk2Function · 0.85
count_filesFunction · 0.85

Calls 5

isdirMethod · 0.80
isfileMethod · 0.80
listdirMethod · 0.45
joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected