rem: if (file.isDirectory()) { array[i] = file; i++; } else { for (var k = 0; k < splitFilters.length; ++k) { var tmpStr = splitFilters[k]; /* split up in to an array */ var matchStr; if (tmpStr == "*.*") { matchStr = ".*"; } else { var tmpArray = tmpStr.match("\*\.(.*)"); var matchStr = ".*\\." + tmpArray[1] + "$"; } if (file.leafName.match(matchStr)) { array[i] = file; i++; 
add: if (file.isDirectory() || matchAllFiles) array[i++] = file; else { for (var k = 0; k < extensions.length; k++) { /* index where the match should take place */ var matchIndex = file.leafName.length - extensions[k].length;  if ((matchIndex >=0 ) && file.leafName.lastIndexOf(extensions[k]) == matchIndex) { array[i++] = file; 
context: function getDirectoryContents(parentElement, dirContents){  var i = 0;  var array = new Array();  var splitFilters = currentFilter.split("; ");  while (dirContents.hasMoreElements()) {    var file = dirContents.getNext().QueryInterface(nsILocalFile);    /* split up the current filter since there might be more than one thing in it */    try {      /* always add directories */      if (file.isDirectory()) {        array[i] = file;        i++;      } else {        for (var k = 0; k < splitFilters.length; ++k) {          var tmpStr = splitFilters[k];          /* split up in to an array */          var matchStr;          if (tmpStr == "*.*") {            matchStr = ".*";          } else {            var tmpArray = tmpStr.match("\*\.(.*)");            var matchStr = ".*\\." + tmpArray[1] + "$";          }          if (file.leafName.match(matchStr)) {            array[i] = file;            i++;            break;          }        }      }    } catch(ex) { }  }  if (array.length > 0) {    /* sort the array */    array.sort(dirSort);        createTree(parentElement, array);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5fc77a6bd56ca0ca72a6fc56c3933a3f041c0540/filepicker.js/buggy/xpfe/components/filepicker/res/content/filepicker.js