CreateBinaryFile
This commit is contained in:
parent
21747acc44
commit
f85e33ae08
1 changed files with 10 additions and 0 deletions
|
|
@ -486,6 +486,16 @@ FS.prototype.CreateTextFile = function(filename, parentid, str) {
|
|||
return id;
|
||||
}
|
||||
|
||||
FS.prototype.CreateBinaryFile = function(filename, parentid, arraybuffer) {
|
||||
var id = this.CreateFile(filename, parentid);
|
||||
var x = this.inodes[id];
|
||||
var data = this.inodedata[id] = new Uint8Array(arraybuffer.slice());
|
||||
//x.waswritten = true;
|
||||
x.size = arraybuffer.byteLength;
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
FS.prototype.OpenInode = function(id, mode) {
|
||||
var inode = this.GetInode(id);
|
||||
if ((inode.mode&S_IFMT) == S_IFDIR) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue