Skip to content

Commit

Permalink
Added command to add "data" folder if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
afroneth committed Sep 15, 2020
1 parent 8240132 commit 860753e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Duke is a chat-bot application that helps you to manage your daily tasks through

* [Quick Start](#quick-start)
* [Features](#features)
* [Feature Details](#features)
* [Feature Details](#feature-details)

<img src="https://raw.githubusercontent.com/afroneth/ip/master/docs/Ui.png" width="400">

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/Duke.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.io.File;

/**
* Main driver class for Duke.
*/
Expand All @@ -22,6 +24,8 @@ public Duke(String path) {
public Duke() {
this.ui = new Ui();
this.storage = new Storage("data/duke.txt");
File file = new File("data");
file.mkdir();
try {
this.arrayOfTasks = new TaskList(storage.load());
} catch (DukeException error) {
Expand Down

0 comments on commit 860753e

Please sign in to comment.