Note: As both @defragster and @MichaelMeissner, mentioned, we are working on integrating in MTP into Teensyduino.
As for being able to access files stored on an SD card (either built in or over SPI), can be reasonably simply:
One of the example sketches looks like:
Code:
#include <SD.h>
#include <MTP_Teensy.h>
#define CS_SD BUILTIN_SDCARD // Works on T_3.6 and T_4.1
//#define CS_SD 10 // Works on SPI with this CS pin
void setup()
{
Serial.begin(9600);
while (!Serial && millis() < 5000) {
// wait for serial port to connect.
}
// mandatory to begin the MTP session.
MTP.begin();
// Add SD Card
if (SD.begin(CS_SD)) {
MTP.addFilesystem(SD, "SD Card");
Serial.println("Added SD card using built in SDIO, or given SPI CS");
} else {
Serial.println("No SD Card");
}
Serial.println("\nSetup done");
}
void loop() {
MTP.loop(); //This is mandatory to be placed in the loop code.
}
Which when run (Built with USB Type= MTP Disk...

And from this window you can use the MTP integration (in this case file explorer), to walk the directory structure and do things like copy files from your Teensy to your host, or host to teensy, delete files, ...
However This is not File System like a Mass Storage Device. That is there is no drive letter in PC for the storage(s) contained in the Teensy object here. (You can have more than one).
So for example you can not open a file up that is contained on your Teensy and the PC application manipulate the actual file.
But sometimes it feels like you can, as for example double clicking on a file, like a JPG or .WAV or the like the system downloads a copy of the file (probably to temp?) and then passes that off to the associated app that can show/play that file...
Sorry If I did not explain the differences very well. Just wanted to mention there are limits to things that you can do.