-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
41 lines (32 loc) · 1.06 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// Created by lutfullah on 13.06.2022.
//
#include "main.h"
using namespace std;
int main(int argc, char** argv) {
SISKO32 sisko(argv[1]);
Kabuk kabuk(&sisko);
vector<string> komutKelimeleri;
do {
kabuk.promptYaz();
string komut;
getline(cin, komut);
komutKelimeleri = ayir(komut, ' ');
if (!komutKelimeleri.empty()) {
if (komutKelimeleri[0] == "cd") {
kabuk.cd(komutKelimeleri);
} else if (komutKelimeleri[0] == "ls") {
kabuk.ls(komutKelimeleri);
} else if (komutKelimeleri[0] == "mkdir") {
kabuk.mkdir(komutKelimeleri);
} else if (komutKelimeleri[0] == "touch") {
kabuk.touch(komutKelimeleri);
} else if (komutKelimeleri[0] == "mv") {
kabuk.mv(komutKelimeleri);
} else if (komutKelimeleri[0] == "cat") {
kabuk.cat(komutKelimeleri);
}
}
} while (komutKelimeleri.empty() || komutKelimeleri[0] != "quit");
return 0;
}