private static void getConfigLocations(File dir, String curPath,
			String cfgFileName, String filePrefix, List<String> files,
			boolean isFullPath) {
		String[] fileNames = dir.list();
		if (fileNames == null)
			return;
		String filePath = dir.getPath();
		for (int i = 0, len = fileNames.length; i < len; i++) {
			if (fileNames[i].equals(".") || fileNames[i].equals(".."))
				continue;
			if (fileNames[i].startsWith(cfgFileName)
					&& fileNames[i].endsWith(".xml")) {
				if (isFullPath)
					files.add(filePath + "/" + fileNames[i]);
				else
					files.add(filePrefix + curPath + "/" + fileNames[i]);
				continue;
			}
			File file = new File(filePath + "/" + fileNames[i]);
			if (file.isDirectory()) {
				// recursion
				getConfigLocations(file, curPath + "/" + fileNames[i],
						cfgFileName, filePrefix, files, isFullPath);
			}
		}
	}