@@ -0,0 +1,1925 @@
+package seedu.taskman.logic.commands;%0A%0Aimport seedu.taskman.commons.core.config.Config;%0Aimport seedu.taskman.commons.core.config.ConfigData;%0Aimport seedu.taskman.commons.util.FileUtil;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * Changes the save location of the data file%0A */%0Apublic class StoragelocCommand extends Command %7B%0A%0A    public static final String COMMAND_WORD = %22storageloc%22;%0A%0A    public static final String MESSAGE_USAGE = COMMAND_WORD + %22: Saves to the specified file name and location and sets the application to load from the specified location in the future. %22%0A            + %22Parameters: LOCATION%5Cn%22%0A            + %22Example: %22 + COMMAND_WORD%0A            + %22 C:/Users/Owner/Desktop/new_tasks.xml%22;%0A%0A    public static final String MESSAGE_SUCCESS = %22Save location successfully updated to %251$s%22;%0A    public static final String MESSAGE_FAILURE = %22Attempt to Save Location was unsuccessful.%5Cn%22 +%0A            %22Save location reverted to %251$s%22;%0A%0A    private final String filePath;%0A%0A    public StoragelocCommand(String filePath)%7B%0A        this.filePath = FileUtil.getAbsolutePath(filePath);%0A    %7D%0A%0A    @Override%0A    public CommandResult execute() %7B%0A        assert model != null;%0A        assert storage != null;%0A%0A        boolean saveChanged = false;%0A        ConfigData initialConfigData = Config.getInstance().getDataClone();%0A%0A        try %7B%0A            storage.saveTaskMan(model.getTaskMan(),filePath);%0A            Config.getInstance().setTaskManFilePath(filePath);%0A            Config.save();%0A            storage.setTaskManFilePath(filePath);%0A            saveChanged = true;%0A        %7D catch (IOException e) %7B%0A            Config.getInstance().setTaskManFilePath(initialConfigData.getTaskManFilePath());%0A        %7D%0A%0A        String message = saveChanged%0A                ? MESSAGE_SUCCESS%0A                : MESSAGE_FAILURE;%0A%0A        return new CommandResult(String.format(message, Config.getInstance().getTaskManFilePath()));%0A    %7D%0A%7D%0A

Add StoragelocCommand