Stored Command Files On Pixhawk

I am running APM on a pixhawk and I am trying to create a new flight mode which will read commands stored onboard in a csv file and read them in at a regular rate to a control system. However, I am quickly finding out that many of C and C++'s file IO functions are not available when I try to include them in the build. Does anyone know if this has been attempted before? How much of an endeavor is this going to be?