Yeah, you could look at the bundled virtual printer to see how it handles it. I used that as a starting point for the Bambu plugin I've been working on. It lists files uploaded to X1 via ftps commands and responds the file list as expected.
this only works because my plugin is using serial factory, but you could potentially achieve the same with gcode queueing hook to catch the M20 command (possibly replace with another command or completely ignore it) and then use the comm module to virtually receive the results. I would have to look into the comm module more to see if that could be utilized to mimic commands received.
I've seen this plugin developed already for aircards
That would be a good assumption assuming the flashforge plugin doesn't specify any order in their hooks.