CSC207-2022F-UofT / mcpm

[WIP] Minecraft package manager
MIT License
8 stars 0 forks source link

Add Import #98

Closed MstrPikachu closed 1 year ago

MstrPikachu commented 1 year ago

PR for the import use case. In this PR, the StringStorage interface was made to represent a class that can store strings, because export is about storing a string into a kind of format. FixedFileStorage and PasteBinStorage are StringStorage classes that write to a file and to pastebin respectively.

There is also an ExportModel class to store what information about a plugin is used in the export (in this case version and name).

Import is currently implemented by installing all the plugins and then returning information about the installs. Currently merging the information is a bit scuffed but everything else should be fine