USB Mass storage on Arduino Zero

Hello!
Lets imagine the following, i have a SD card connected to an Arduino Zero and write data to it.
Then i want to transfer this data to a computer without removing the SD card.
This can be done though the virtual serial port.

But, could it be possible that the Zero presents itself as a mass storage device to the computer so i can access the information on the SD card just like i would be able to with a USB stick?

Greetings,
Peter

I don't know about implementing a software solution to your question, but I have a hardware solution. GHI Electronics has a chip that can act as an interface between both your Arduino and the PC to the SD Card. Here's the product link, look specifically at SD Reader Mode. The second link is a board they sell and they pretty much describe your exact application.

https://www.ghielectronics.com/catalog/product/512

https://www.ghielectronics.com/catalog/product/523

PeterFW:
But, could it be possible that the Zero presents itself as a mass storage device to the computer so i can access the information on the SD card just like i would be able to with a USB stick?

Years ago I implemented something very similar on Teensy 2.0. So if I could do it then using an 8 bit AVR, certainly it would seem possible to do on Arduino Zero. The programming required isn't simple, but it's not impossible either.

But after doing this so many years ago, I learned a painful lesson. With MSC protocol, it's extremely difficult for the Arduino sketch to use the SD card. I tried adding a pair of locking APIs... one for short duration to span the time of a single command to the SD card controller, and another meant to allow the Arduino sketch to tell the PC the physical media was removed. Then I learned another painful lesson: Windows does a lot of second-guessing and doesn't fully respect the SCSI sense codes. I never managed to get it fully working, where the sketch could reliably control whether the PC believed it had access to the media.

Soon I'm going to retry this mostly-failed experiment on newer Teensy boards using MTP instead of MSC. MTP, at least in theory, should allow better media sharing. But it's going to impose more work on the sketch, rather than allowing the card to be accessed automatically. The other minor issue with MTP is lack of support on Apple Macintosh.

So regarding your original question "could it be possible", I can say with confidence it is indeed possible with a large amount of difficult programming, but the MSC protocol ends up being very limiting if you want to do anything more than end up with a very slow version of SD card reader.