private void processDirectory(List<File> standardLibs, List<File> debugLibs, File directory) {

		File[] files = directory.listFiles();
		if (files == null) {
			return;
		}

		List<File> subdirs = new ArrayList<>();

		// filenames are forced into lower case before comparing because
		// MS windows filesystems are case-insensitive.
		Map<File, File> normalizedLibs = new HashMap<>();
		for (File file : files) {
			if (file.isFile() && getFileExt(file).toLowerCase().equals("lib")) {
				File normalizedFile = new File(directory, file.getName().toLowerCase());
				normalizedLibs.put(normalizedFile, file);
			}
			else if (file.isDirectory()) {
				subdirs.add(file);
			}
		}

		Set<File> localStdLibs = new HashSet<>();
		Set<File> localDebugLibs = new HashSet<>();
		for (Entry<File, File> entry : normalizedLibs.entrySet()) {
			File normalizedFile = entry.getKey();
			File libFile = entry.getValue();
			String libnameNoExt = getFilenameNoExt(normalizedFile);

			Set<File> destSet = localStdLibs;
			if (libnameNoExt.endsWith("d")) {
				String baseLibStr = libnameNoExt.substring(0, libnameNoExt.length() - 1) + ".lib";
				File baseLibFile = new File(normalizedFile.getParentFile(), baseLibStr);
				if (normalizedLibs.containsKey(baseLibFile)) {
					destSet = localDebugLibs;
				}
			}
			destSet.add(libFile);
		}
		standardLibs.addAll(localStdLibs);
		debugLibs.addAll(localDebugLibs);


		for (File subdir : subdirs) {
			processDirectory(standardLibs, debugLibs, subdir);
		}
	}
Recursively scans a directory for ".lib" files and adds them to either the
non_debug_files list or the debug_files list.
<p>
Libraries are segregated into standard or debug versions by looking at the last character
of the filename.  If it ends in 'd', and a base library with the same name minus the
'd' is in the directory, the library is determined to be a debug library.  All others
are standard libraries.

@param standardLibs
@param debugLibs
@param directory
Ghidra/Features/FunctionID/ghidra_scripts/MSLibBatchImportGenerator.java