public static Path getHelpTopicDir(Path file) {
		Path helpTopics = file.getFileSystem().getPath("help", "topics");
		int last = file.getNameCount();
		for (int i = 0; i < last; i++) {
			Path sp = file.subpath(i, last);
			if (sp.startsWith(helpTopics)) {
				return file.subpath(0, i + 3); // 2 for help/topics, 1 for the actual topic
			}
		}
		return null;
	}
Returns a file object that is the help topic directory for the given file.
  
<p>This method is useful for finding the help topic directory when the given file doesn't 
live directly under a help topic.
@param file the file for which to find a topic
@return the path to the help topic directory
Ghidra/Framework/Help/src/main/java/help/HelpBuildUtils.java