First draft of storage APIs (#122)
* First draft of storage APIs * bumped pxt-core * using fixed instances to seprate temp from permanent * send console to storage * sim support * missing sim stubs * adding storage blocks * more sim support * remove storage from default package * fix rendering of ms * render raw ms * slize at better place * duplicate bundled dir * refactor limit * simplify limit logic
This commit is contained in:
committed by
Peli de Halleux
parent
966fd81870
commit
20a4673f98
11
libs/storage/storage.ts
Normal file
11
libs/storage/storage.ts
Normal file
@ -0,0 +1,11 @@
|
||||
namespace storage {
|
||||
// automatically send console output to temp storage
|
||||
storage.temporary.remove("console.txt");
|
||||
console.addListener(function(line) {
|
||||
const fn = "console.txt";
|
||||
const mxs = 65536;
|
||||
const t = control.millis();
|
||||
storage.temporary.appendLine(fn, `${t}> ${line}`);
|
||||
storage.temporary.limit(fn, 65536);
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user