implementation of makedir & makefile
This commit is contained in:
@@ -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*/
|
||||
|
||||
Reference in New Issue
Block a user