boolean lastRound = i == copierSettings.length - 1;
boolean lastRound = (i == copierSettings.length - 1);
	public void copyResources( File targetDir, Device device, Locale locale ) 	throws IOException 	{		// create target dir:		if (!targetDir.exists()) {			targetDir.mkdirs();		}		// add manual excludes from the user:		this.resourceFilter.setAdditionalFilters( this.resourceSetting.getFilters(this.booleanEvaluator));		File[] resources = getResources( device, locale );		RootSetting[] includeSubDirsRoots = getIncludeSubDirsRoots();		//FileUtil.copy(resources, targetDir);		// creating resource copier:		ResourceCopierSetting[] copierSettings = this.resourceSetting.getCopiers( this.environment.getBooleanEvaluator() );		if (copierSettings == null || copierSettings.length == 0 ) {			// use default resource copier:			ResourceCopier resourceCopier = ResourceCopier.getInstance( null, this.extensionManager, this.environment );			resourceCopier.copyResources(device, locale, resources, targetDir);			for (int i = 0; i < includeSubDirsRoots.length; i++) {				RootSetting rootSetting = includeSubDirsRoots[i];				copyRootWithSubDirs( device, locale, rootSetting.resolveDir( this.environment ), resourceCopier, targetDir );			}		} else {			// copy resources using user- or device-defined resource copiers:			for (int i = 0; i < copierSettings.length; i++) {				ResourceCopierSetting setting = copierSettings[i];				ResourceCopier resourceCopier = ResourceCopier.getInstance( setting, this.extensionManager, this.environment );				File tempTargetDir;				boolean lastRound = i == copierSettings.length - 1; 				if ( lastRound ) {					tempTargetDir = targetDir;				} else {					tempTargetDir = new File( device.getBaseDir() + File.separatorChar + "res" + i );					if ( tempTargetDir.exists() ) {						FileUtil.delete( tempTargetDir );					}					tempTargetDir.mkdir();				}				resourceCopier.copyResources(device, locale, resources, tempTargetDir);				if (!lastRound) {					resources = tempTargetDir.listFiles();				}			}		}		if (this.localizationSetting != null && this.localizationSetting.isDynamic()) {			saveDynamicTranslations( targetDir, device );		}	}