Working with files
winniederidder opened this issue · 1 comments
winniederidder commented
Many exercises make extensive use of files. This feature would be nice to have support for in Papyros.
The following items describe the expected functionality:
- Being able to upload a file from a location of choice
- Being able to use this file in code written in Papyros
- In Dodona, resolving the path to a file served by Dodona and loading it dynamically
- Saving results to files and being able to download these to a location of choice
Some remarks on how this can be achieved:
When pre-loading files, a JavaScript FileSystem API should be provided to store the files as the Worker may be terminated and would lose the files. They should be set when needed. If this FileSystem is visualised, an easy way to download files could be implemented.
Resolving files dynamically will lead to asynchronous operations on a syncrhonous API, which requires sync-message functionality and proper care when overriding e.g. open
.