Skip to content
Alan K edited this page Jan 7, 2014 · 4 revisions

Virtual File System

When Filer.IO is loaded, it creates a new singleton VFS instance. A local file system is then mounted onto the root directory of the VFS.

<script src="filer-client.js></script>
<script>

var fs = fio.fs; // Contains the VFS
var sh = new fio.Shell();

fs.stat('/', function(stats) {
  // stats for root directory
});

sh.ls('/', function(files) {
  // list of files
});

fs.mkdir('/shared', function() {
  var opts = {
    key: <crypto-key>
  };
  fs.mount('https://filer.io/fs', '/shared', opts, function() {
  });
});
</script>
Clone this wiki locally