package seedu.taskboss.logic.parser;

import static seedu.taskboss.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;

import java.io.File;

import seedu.taskboss.logic.commands.Command;
import seedu.taskboss.logic.commands.SaveCommand;

//@@author A0138961W
/**
 * Parses input arguments and creates a new SaveCommand object
 */

public class SaveCommandParser {

    /**
     * Parses the given arguments in the context of the SaveCommand
     * and returns an SaveCommand object for execution.
     */
    public Command parse(String args) {

        if (args.trim() == null) {
            return new IncorrectCommand(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, SaveCommand.MESSAGE_USAGE));
        }

        File file = new File(args.trim());

        if (!file.exists() && !file.isDirectory()) {
            file.mkdirs();
        }

        return new SaveCommand(args.trim());
    }

}

@@ -183,16 +183,71 @@
 ommand;%0A
+import seedu.taskboss.logic.commands.IncorrectCommand;%0A
 import s

Update SaveCommandParser.java