chore(control): change create_folder api to create_path

This commit is contained in:
E44
2026-01-18 11:55:51 +01:00
parent d63fc5cac4
commit 7f6891ecff
2 changed files with 29 additions and 44 deletions
+2 -7
View File
@@ -110,16 +110,11 @@ export async function get_file_tree_data(ip: string, path: string): Promise<Tree
return tree_element?.contents || null;
}
export async function create_folders(
export async function create_path(
ip: string,
path: string,
folder_names: string[]
): Promise<void> {
let command = `cd ".${path}"`;
for (const part of folder_names) {
command += ` && mkdir "${part}" && cd "${part}/"`;
}
const command = `mkdir -p ".${path}"`
const raw_response = await run_shell_command(ip, command);
if (!raw_response.ok || !raw_response.json) return;