public FileSystemRef probeFileForFilesystem(FSRL containerFSRL, TaskMonitor monitor,
			FileSystemProbeConflictResolver conflictResolver, int priorityFilter)
			throws CancelledException, IOException {

		synchronized (fsInstanceManager) {
			FileSystemRef ref = fsInstanceManager.getFilesystemRefMountedAt(containerFSRL);
			if (ref != null) {
				return ref;
			}

			GFileSystem subdirFS = probeForLocalSubDirFilesystem(containerFSRL);
			if (subdirFS != null) {
				ref = subdirFS.getRefManager().create();
				fsInstanceManager.add(subdirFS);
				return ref;
			}
		}

		// Normal case, probe the container file and create a filesystem instance.
		// Do this outside of the sync lock so if any swing stuff happens in the conflictResolver
		// it doesn't deadlock us.
		try {
			ByteProvider byteProvider = getByteProvider(containerFSRL, true, monitor);
			GFileSystem fs =
				fsFactoryMgr.probe(byteProvider, this, conflictResolver, priorityFilter, monitor);
			if (fs != null) {
				synchronized (fsInstanceManager) {
					FileSystemRef fsRef = fsInstanceManager.getFilesystemRefMountedAt(fs.getFSRL());
					if (fsRef != null) {
						// race condition between sync block at top of this func and here.
						// Throw away our new FS instance and use instance already in
						// cache.
						fs.close();
						return fsRef;
					}

					fsInstanceManager.add(fs);
					return fs.getRefManager().create();
				}
			}
		}
		catch (IOException ioe) {
			Msg.trace(this, "Probe exception", ioe);
			throw ioe;
		}
		return null;
	}
Auto-detects a filesystem in the container file pointed to by the FSRL.
<p>
Returns a filesystem instance for the requested container file, either from an already
loaded instance in the Global fs cache, or by probing for a filesystem in the container
file using a {@link FileSystemFactoryMgr}.
<p>
Returns null if no filesystem implementation was found that could handle the container
file.

@param containerFSRL {@link FSRL} of the file container
@param monitor {@link TaskMonitor} to watch and update progress.
@param conflictResolver {@link FileSystemProbeConflictResolver} to handle choosing
the correct file system type among multiple results, or null if you want
{@link FileSystemProbeConflictResolver#CHOOSEFIRST} .
@param priorityFilter minimum filesystem {@link FileSystemInfo#priority()} to allow
when using file system factories to probe the container.
@return new {@link FileSystemRef} or null
@throws CancelledException if user cancels.
@throws IOException if IO problem.
Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FileSystemService.java