Save image to pc

what is the best way to save an image to the hard drive of the pc that runs the ide?
The camera is attached always via usb.

i want to save an image on an event and not continuously.
Is this possible at all?
i cant find something similar i found only to sd card examples .

It’s possible but not with mass storage, and not while the IDE is running, there’s more than one option, you can send it with USB_VCP (there’s an example), over USB debugging (there’s an example with pygame etc…) and probably the easiest is with the RPC library.