const {fs} = require('tabris');

let file = fs.filesDir + '/test.dat';

let data = new Uint8Array([1, 2, 3]).buffer;

fs.writeFile(file, data)
  .then(() => fs.readFile(file))
  .then(content => console.log('read ' + content.byteLength + ' bytes'))
  .then(() => fs.removeFile(file))
  .catch(err => console.error(err));

@@ -1,17 +1,32 @@
 const %7B
-fs
+ImageView, fs, ui
 %7D = requ
@@ -59,13 +59,13 @@
  fs.
-files
+cache
 Dir 
@@ -77,19 +77,19 @@
 est.
-dat
+png
 ';%0A%0Alet 
 data
@@ -88,73 +88,213 @@
 let 
-data = new Uint8Array(%5B1, 2, 3%5D).buffer;%0A%0Afs.writeFile(file, data
+imageView = new ImageView(%7B%0A  centerX: 0, centerY: 0, width: 400, height: 200,%0A  background: '#aaaaaa'%0A%7D).appendTo(ui.contentView);%0A%0Afetch('http://lorempixel.com/400/200/')%0A  .then(res =%3E res.arrayBuffer()
 )%0A  
@@ -303,21 +303,24 @@
 hen(
-()
+data
  =%3E fs.
-read
+write
 File
@@ -320,24 +320,30 @@
 iteFile(file
+, data
 ))%0A  .then(c
@@ -345,101 +345,74 @@
 hen(
-content =%3E console.log('read ' + content.byteLength + ' bytes'))%0A  .then(() =%3E fs.removeFile(
+() =%3E imageView.image = file)%0A  .then(() =%3E console.log('image:', 
 file

Load an image in the fs snippet