$CS107E directory contains a library
libpisd.a that provides functionality for accessing the SD card from the Raspberry Pi. If you link with this library, you can call its functions to read and write files on the internal SD card. The library is based on FatFs, a filesystem specifically designed for use in embedded systems.
To get started with using
$CS107E/include/ff.hdeclares the available functions with very brief explanation. Read the more complete documentation for the FatFs Application Interface.
sd_fatfsin the directory
$CS107E/examples. This test application demonstrates reading and writing files on the SD card. You can build and run the example application to try it out and review the code to see how it operates.
libpisdand the source file should
#include "ff.h". The example project demonstrates a correct build configuration that you can use as a model.
A few cautionary notes:
localtimefunctions to set the modification time when writing a file. In our unhosted world, these functions are unimplemented, so a file written on the Raspberry Pi will have a bogus date for its modification time. You can investigate writing your own timekeeping functions to supply proper date/time information if you need correct timestamps.