static Path findNearestRoot(Path filePath, List<String> targetFileNames) {
		Path file = filePath.toAbsolutePath().normalize();
		Path parent = file.getParent();

		// stop/skip local root dir (user.home)
		while (parent != null && !Settings.getLocalRootDir().equals(parent)) {
			for (String targetFileName : targetFileNames) {
				Path targetFile = parent.resolve(targetFileName);
				if (Files.exists(targetFile)) {
					return targetFile;
				}
			}
			parent = parent.getParent();
		}
		return null;
	}
Returns a parent path if one of the targetFileNames exist in such parent.

@param filePath
@param targetFileNames list of markers to search for
@return if found returns the marker path, if none found return null.
src/main/java/dev/jbang/cli/Edit.java