We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a16f861 commit 3544b30Copy full SHA for 3544b30
1 file changed
utils/misc/nodejs-terminal/html/webcontainer-fs/webcontainer-fs.html
@@ -428,13 +428,27 @@
428
//:
429
430
431
-
432
433
434
435
436
437
+ obj.write = async function(path,blob){
+
+ var buf = await blob.arrayBuffer();
+ var uint8 = new Uint8Array(buf);
+ await webcontainer.fs.writeFile(path,uint8);
+ }//write
438
439
440
+ obj.read = async function(path){
441
442
+ var uint8 = await webcontainer.fs.readFile(path);
443
+ var blob = new Blob([uint8]);
444
+ return blob;
445
446
+ }//read
447
448
449
450
451
+ //:
452
453
454
0 commit comments