implementation of makedir & makefile

This commit is contained in:
nova
2026-06-01 22:36:38 +02:00
parent dd5307b411
commit 632904fd89

View File

@@ -290,10 +290,28 @@ void delete(){
TODO;
}
void makedir(){
TODO;
wclear(win_b);
file tmp;
tmp.file_name = malloc(INPUT_BUFFER_SIZE);
if (read_string(win_b, 0, 0, tmp.file_name) == 0) {
char *cmd = parse_cmd("mkdir ", &tmp);
system(cmd);
free(cmd);
}
free(tmp.file_name);
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY);
}
void makefile(){
TODO;
wclear(win_b);
file tmp;
tmp.file_name = malloc(INPUT_BUFFER_SIZE);
if (read_string(win_b, 0, 0, tmp.file_name) == 0) {
char *cmd = parse_cmd("touch ", &tmp);
system(cmd);
free(cmd);
}
free(tmp.file_name);
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY);
}
void enter_shell(unsigned long passes, int index){
(void)passes; /*remove compiler warning*/