Merge branch 'master' into dev

This commit is contained in:
Andres Caicedo
2023-04-09 15:42:53 +02:00
28 changed files with 918 additions and 95 deletions

View File

@@ -64,3 +64,20 @@ def delete_file(filename):
return "File deleted successfully."
except Exception as e:
return "Error: " + str(e)
def search_files(directory):
found_files = []
if directory == "" or directory == "/":
search_directory = working_directory
else:
search_directory = safe_join(working_directory, directory)
for root, _, files in os.walk(search_directory):
for file in files:
if file.startswith('.'):
continue
relative_path = os.path.relpath(os.path.join(root, file), working_directory)
found_files.append(relative_path)
return found_files