Global.helma.Zip.Content ()
constructor for Content Objects

Sourcecode in /home/hannes/helma/modules/helma/Zip.js:
318:   helma.Zip.Content = function() {
319:       this.toc = [];
320:       this.files = {};
321:   
322:       /**
323:        * adds a Zip Entry object to the table of contents
324:        * and the files collection
325:        * @param Object instance of helma.Zip.Entry
326:        */
327:      this.add = function(entry) {
328:          // add the file to the table of contents array
329:          this.toc.push(entry);
330:          // plus add it to the files tree
331:          var re = /[\\\/]/;
332:          var arr = entry.name.split(re);
333:          var cnt = 0;
334:          var curr = this.files;
335:          var propName;
336:          while (cnt < arr.length-1) {
337:              propName = arr[cnt++];
338:              if (!curr[propName])
339:                  curr[propName] = new Object();
340:              curr = curr[propName];
341:          }
342:          curr[arr[cnt]] = entry;
343:          return;
344:      };
345:  
346:      for (var i in this)
347:          this.dontEnum(i);
348:  
349:      return this;
350:  }