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

Method list_directory

recipes/Python/492213_dal5py/recipe-492213.py:58–67  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

56
57 # Get Directory Contents
58 def list_directory(self, path):
59 if path:
60 block, name = self.__resolve_path(path)
61 block = self.__disk.find(block, name)
62 assert block
63 else:
64 block = 1
65 directory = self.__disk.list_directory(block)
66 names = [self.__disk.name(block) for block in directory]
67 return names
68
69 # Check If Empty
70 def empty(self, path):

Callers

nothing calls this directly

Calls 3

__resolve_pathMethod · 0.95
findMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected