package seedu.taskboss.logic.commands;

/**
 * Saves the data at specific filepath. Creates filepath if it does not exist
 */
 
public class SaveCommand extends Command{

public static final String COMMAND_WORD = "save";
    
    public static final String MESSAGE_USAGE = COMMAND_WORD
    		+ "Saves the data at specific filepath.\n"
    		+ "Example: " + COMMAND_WORD
    		+ " C://user/desktop/taskboss";
    
    public static final String MESSAGE_SUCCESS = "The data has been saved!";
    
    public static final String MESSAGE_INVALID_FILEPATH = "The filepath is invalid.";

    private final String filepath;
    
    public SaveCommand(String filepath) {
    	this.filepath = filepath;
    }
	
  @Override
  public CommandResult execute() {
  	assert storage != null;
	storage.setFilePath(filepath);
	return new CommandResult(MESSAGE_SUCCESS);
	}
  
}

@@ -119,18 +119,17 @@
 ist%0A */%0A
- 
 %0A
+
 public c
@@ -213,21 +213,17 @@
 %22save%22;%0A
-    
 %0A
+
     publ
@@ -396,21 +396,17 @@
 kboss%22;%0A
-    
 %0A
+
     publ
@@ -474,21 +474,17 @@
 aved!%22;%0A
-    
 %0A
+
     publ
@@ -601,13 +601,9 @@
 th;%0A
-    
 %0A
+
     
@@ -681,10 +681,9 @@
   %7D%0A
-%09
 %0A
+
   @O
@@ -831,13 +831,11 @@
 SS);%0A%09%7D%0A
-  
 %0A%7D%0A

Fix trailing white space