Skip to content

Commit 3f923f1

Browse files
save file
1 parent a896da5 commit 3f923f1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

utils/misc/nodejs-terminal/html/webcontainer-fs/webcontainer-fs.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,18 @@
446446
}//read
447447

448448

449+
obj.save = function(file,blob){
450+
451+
var buf = await blob.arrayBuffer();
452+
var uint8 = new Uint8Array(buf);
453+
var abs = file.abs;
454+
await webcontainer.fs.writeFile(abs,uint8);
455+
456+
}//save
457+
458+
459+
obj.load = function(){
460+
}//load
449461

450462

451463
//:

0 commit comments

Comments
 (0)