code: function() {
  				var selected = Object.keys(selectedFiles),
  					opts = { selected : selected };
  				
  				allSelected = selected.length && (selected.length === (incHashes || cwdHashes).length) && (!fm.maxTargets || selected.length <= fm.maxTargets);
  				if (selectCheckbox) {
  					selectAllCheckbox.find('input').prop('checked', allSelected);
  					cwd[allSelected? 'addClass' : 'removeClass']('elfinder-cwd-allselected');
  				}
  				if (allSelected) {
  					opts.selectall = true;
  				} else if (! selected.length) {
  					opts.unselectall = true;
  				}
  				fm.trigger('select', opts);
  			}
docs: fm.time('cwdLoad');