Add rm templates

master
germanFid 2022-06-22 21:23:55 +03:00
parent 446bf42b31
commit 21104b3d55
1 changed files with 15 additions and 1 deletions

View File

@ -228,7 +228,7 @@ int executeCommand(char* command, char* minorArg, Folder* majorArgFolder, File*
return SUCCESS; return SUCCESS;
} }
if (!strcmp(command, "ls")) else if (!strcmp(command, "ls"))
{ {
Folder* PrintDirectory; Folder* PrintDirectory;
if (!majorArgIsFolder) if (!majorArgIsFolder)
@ -248,6 +248,20 @@ int executeCommand(char* command, char* minorArg, Folder* majorArgFolder, File*
print_list(PrintDirectory, 0); print_list(PrintDirectory, 0);
} }
else if (!strcmp(command, "rm"))
{
if (!majorArgIsFolder)
{
// Работаем с файлом, удаление MajorArgFile
}
else
{
// Работаем с папкой, рекурсивное удаление MajorArgFolder
}
}
else else
{ {
printf("Unknown command: %s", command); printf("Unknown command: %s", command);