MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / list_files

Method list_files

utils.py:788–803  ·  view source on GitHub ↗
(self, directory)

Source from the content-addressed store, hash-verified

786 self.logger.error(f"Error saving configuration: {e}")
787
788 def list_files(self, directory):
789 files = []
790 for entry in os.scandir(directory):
791 if entry.is_dir():
792 files.append({
793 "name": entry.name,
794 "is_directory": True,
795 "children": self.list_files(entry.path)
796 })
797 else:
798 files.append({
799 "name": entry.name,
800 "is_directory": False,
801 "path": entry.path
802 })
803 return files
804
805 def list_files_endpoint(self, handler):
806 try:

Callers 2

list_files_endpointMethod · 0.95
legacy_list_filesFunction · 0.80

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected