Okay, I found the bug.
It’s really subtle.
So, basically, the issue is that the OpenMV Cam and your PC are both writing to the file system at the same time and not noticing each other changes. When you click the reset button on OpenMV IDE it causes a file system flush on the PC side which deletes whatever files the OpenMV Cam wrong to the disk.
So, I will fix this issue in OpenMV IDE not to flush the filesystem when you hit the reset button but only on file save. That said, this issue can still happen if you edit any files on the camera via another program.
In the mean time, the quickest way to get around this issue is just to unplug your OpenMV Cam from the PC and plug it back in if you want to see the file. This prevents any writes from happening to the disk. Do not use the “Reset OpenMV Cam Button”.
Can this be fixed in a better way? Unfortunately no. Windows/Mac/Linux all assume they are the sole masters of USB drives and do not scan for changes after loading a drive block disk (they see USB drives as byte storage devices). So, if the camera makes any changes to the files on the drive the PC ignores this. There’s no way to get the PC to rescan the drive too. A rescan only happens when the camera is plugged in. So, for you to see files on the OpenMV Cam you have to create the files and then disconnect from the PC before it does any more writes.
Note: This behavior affects the internal and SD card flash drives. The file disappears because the root directly gets updated by OpenMV IDE trying to flush pending writes to the disk. This erases the new file you created on the camera by deleting it’s file pointer. That said, this also orphans any FAT sectors the file was using too.