define(['typeServices/dispatch'], function(dispatch) {

  'use strict';
  
  function Volume() {
    this.files = {};
  }
  Volume.prototype = {
    charset: 'utf-8',
    pathSeparator: '/',
    joinPath: function(parts) {
      return parts.join(this.pathSeparator);
    },
    splitPath: function(path) {
      return path.split(this.pathSeparator);
    },
    addFile: function(path, segment) {
      this.files[path] = segment;
      this.onfile(path, segment);
    },
    onfile: function(){},
    guessTypeForFilename: function(filename) {
      var ext = filename.match(/[^\.\/\\\:]*$/)[0].toLowerCase();
      return dispatch.byExtension[ext] || 'application/octet-stream';
    },
  };
  
  return Volume;

});

@@ -684,17 +684,867 @@
    %7D,%0A  
-%7D
+  getSubVolume: function(path) %7B%0A      return new SubVolume(this, path);%0A    %7D,%0A  %7D;%0A  %0A  function SubVolume(volume, path) %7B%0A    this.volume = volume;%0A    this.path = path;%0A  %7D;%0A  SubVolume.prototype = %7B%0A    get charset() %7B%0A      return this.volume.charset;%0A    %7D,%0A    get pathSeparator() %7B%0A      return this.volume.pathSeparator();%0A    %7D,%0A    joinPath: function(parts) %7B%0A      return this.volume.joinPath(parts);%0A    %7D,%0A    splitPath: function(path) %7B%0A      return this.volume.splitPath(parts);%0A    %7D,%0A    addFile: function(path, segment) %7B%0A      this.volume.addFile(this.path + path, segment);%0A    %7D,%0A    guessTypeForFilename: function(filename) %7B%0A      return this.volume.guessTypeForFilename(filename);%0A    %7D,%0A    getSubVolume: function(path) %7B%0A      return this.volume.getSubVolume(this.path + path);%0A    %7D,%0A  %7D;%0A  %0A  Volume.SubVolume = SubVolume
 ;%0A  %0A  r

Add SubVolume