MCPcopy Index your code
hub / github.com/stitionai/devika / read_directory

Method read_directory

src/filesystem/read_code.py:15–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 self.directory_path = os.path.join(project_path, project_name.lower().replace(" ", "-"))
14
15 def read_directory(self):
16 files_list = []
17 for root, _dirs, files in os.walk(self.directory_path):
18 for file in files:
19 try:
20 file_path = os.path.join(root, file)
21 with open(file_path, 'r') as file_content:
22 files_list.append({"filename": file_path, "code": file_content.read()})
23 except:
24 pass
25
26 return files_list
27
28 def code_set_to_markdown(self):
29 code_set = self.read_directory()

Callers 1

code_set_to_markdownMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected