
#include "..\..\lib\vp2k.h"
#include "..\..\lib\MFS.h"

#define _DISK_A     0
#define _DISK_B     1

int main(void)
{
    int iFileHandle,iRet;
    char Data[80];
    
    InitLib();
    iRet=mfs_Init();
    if(iRet<=0) return;
    
    iFileHandle=mfs_OpenFile(_DISK_A,"Test.txt","r");
    if(iFileHandle>0)
    {
        Print("Reading from Test.txt...\n\r");
        iRet=mfs_Gets(iFileHandle,Data,80); //max length is 80 bytes.
        if(iRet>0) Print("Data=%s\n\r",Data);
        
        mfs_CloseFile(iFileHandle);
        Print("done.");
    }
    else
        Print("Open A:\Test.txt error\n\r");
    mfs_Stop();
    return;
}
    
    
    