private void updateFromFilesystem(PrintWriter writer) throws IOException, OSGiException {

		newSources.clear();
		oldBinaries.clear();

		visitDiscrepancies((sourceFile, classFiles) -> {
			// sourceFile is either newer than its corresponding class files,
			// or there are no corresponding class files (meaning it's new),
			// or sourceFile=null and classFiles had no corresponding source
			if (sourceFile != null) {
				// these will be (re)compiled
				newSources.add(sourceFile);
			}
			if (classFiles != null) {
				// these will be deleted
				oldBinaries.addAll(classFiles);
			}
		});

		// we don't want to rebuild source files that had errors last time and haven't changed, so 
		// remove them from newSources.  Also remove old error messages.
		Iterator<ResourceFile> it = newSources.iterator();
		while (it.hasNext()) {
			ResourceFile newSourceFile = it.next();
			if (stillHasErrors(newSourceFile)) {
				it.remove();
			}
			else {
				// any errors are old, so remove them 
				buildErrors.remove(newSourceFile);
			}
		}
	}
Look for new sources, metadata, manifest file.  This will find files that need to be 
compiled and files that need to be removed.

<p>If files had errors last time, haven't changed, and no new requirements are available, 
remove them.

@param writer for reporting status to user
@throws IOException while accessing manifest file
@throws OSGiException while parsing imports
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/GhidraSourceBundle.java