Skip to content

Commit c3116a5

Browse files
committed
Misc
1 parent b5d1930 commit c3116a5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ to do the following:</strong></br>
1414
>> touch -> Create File</br>
1515
>> cd -> change directory</br>
1616
>> rmdir -> remove directory</br>
17-
>> rm -> remove file
17+
>> rm -> remove file</br>
18+
>> ls -> List all subdirectories and files under working directory
1819
1920
#### Output
2021
![Ausgabe](https://user-images.githubusercontent.com/23555312/81896358-18cd4d00-95d2-11ea-9526-bfdde30dd6da.PNG)

main.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ class Directory {
7272
static void list(Directory *dir) {
7373
if (dir->child_dir) {
7474
Directory *dirHead = dir->child_dir;
75-
cout << "Sub-directories" << endl;
75+
cout << "Sub-directories:" << endl;
7676
while (dirHead) {
7777
string dir_name = dirHead->name;
7878
cout << "\t" << dir_name << endl;
7979
dirHead = dirHead->next_dir;
8080
}
8181
}
8282
if (dir->child_file) {
83-
cout << "Files" << endl;
83+
cout << "Files:" << endl;
8484
File *file = (dir->child_file);
8585
while (file) {
8686
string file_name = file->name;
@@ -315,8 +315,6 @@ int identifyCommand(string ch) {
315315

316316

317317
int main() {
318-
319-
//Creating root directory with parent as null
320318
string command;
321319

322320
while (true) {

0 commit comments

Comments
 (0)