I need to do some manipulation on a file byte array and as far as I have read, I cannot do this unless I use ObjectiveC bridging. This is what I have done for now:
var filepath = file.toString();
ObjC.import('stdlib');
ObjC.import('Foundation');
var theFileData = $.NSData.dataWithContentsOfFile(filepath);
var fileSize = theFileData.length;
If I try using $.malloc(filesize)
it will say the function is undefined... how am I supposed to check the contents of theFileData
?