editor/lib/idb.filesystem.js
/**
 * Interface representing a filesystem.
 *
 * Modeled from:
 * dev.w3.org/2009/dap/file-system/pub/FileSystem/#idl-def-LocalFileSystem
 *
 * @param {number} type Kind of storage to use, either TEMPORARY or PERSISTENT.
 * @param {number} size Storage space (bytes) the application expects to need.
 * @constructor
 */
Interface representing a filesystem.

@param {number} type Kind of storage to use, either TEMPORARY or PERSISTENT.
@param {number} size Storage space (bytes) the application expects to need.
@constructor
Interface representing a filesystem . @param { number } type Kind of storage to use either TEMPORARY or PERSISTENT . @param { number } size Storage space ( bytes ) the application expects to need . @constructor
function DOMFileSystem(type, size) {
  storageType_ = type == exports.TEMPORARY ? 'Temporary' : 'Persistent';
  this.name = (location.protocol + location.host).replace(/:/g, '_') +
              ':' + storageType_;
  this.root = new DirectoryEntry();
  this.root.fullPath = DIR_SEPARATOR;
  this.root.filesystem = this;
  this.root.name = '';
}
function DOMFileSystem ( type , size ) { storageType_ = type == exports . TEMPORARY ? 'Temporary' : 'Persistent' ; this . name = ( location . protocol + location . host ) . replace ( / : / g , '_' ) + ':' + storageType_ ; this . root = new DirectoryEntry ( ) ; this . root . fullPath = DIR_SEPARATOR ; this . root . filesystem = this ; this . root . name = '' ; }
Interface representing a filesystem.
Interface representing a filesystem .