Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Allow user to change the save location through command line parameters #85

Open
yamgent opened this issue Aug 17, 2017 · 0 comments
Open

Comments

@yamgent
Copy link
Member

yamgent commented Aug 17, 2017

Our application always saves to addressbook.txt.

User might want to have more than one address book. We need a way for the user to change the save location.

Let's implement a feature whereby the user is able to change the save location by passing in a command line parameter. For example, the user can execute java seedu.addressbook.Main mynewbook.txt in the command line. The application will then save the address book content inside mynewbook.txt instead of addressbook.txt.

Implementation details:

  • Use Application.getParameters() to obtain the command line parameter that the user may have typed in.
  • Pass this input to StorageFile#StorageFile(String filePath).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant