---------------------------------------------------------------------
SYS_FS_HANDLE fHandle = SYS_FS_HANDLE_INVALID;
SYS_FS_RESULT fResult;
char fMedia[20] = "/dev/mmcblka1";
char fDrive[20] = "/mnt/myDrive1";
void CommandMount(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    fResult = SYS_FS_Mount(fMedia, fDrive, FAT, 0, NULL);
    if(fResult == SYS_FS_RES_SUCCESS)
    {
        fResult = SYS_FS_CurrentDriveSet(fDrive);
        if(fResult == SYS_FS_RES_SUCCESS)
        {
            SYS_CMD_PRINT("Mount %s success!\r\n", fMedia);
            SYS_CMD_PRINT("Current Drive is %s\r\n", fDrive);
            return;
        }
    }
    SYS_CMD_PRINT("Mount %s failure!\r\n", fMedia);
}

---------------------------------------------------------------------
    { "mount", CommandMount, ": Mount Media" },

---------------------------------------------------------------------
    SYS_CMD_ADDGRP(MyCmdTbl, sizeof(MyCmdTbl)/sizeof(SYS_CMD_DESCRIPTOR), "MYCMD", ": My Commands"); // Modify

---------------------------------------------------------------------
void CommandOpen(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    fHandle = SYS_FS_FileOpen(argv[1], SYS_FS_FILE_OPEN_APPEND_PLUS);
    if(fHandle != SYS_FS_HANDLE_INVALID)
        SYS_CMD_PRINT("File [%s] opened!\r\n", argv[1] );
    else
        SYS_CMD_MESSAGE("Open failure!\r\n");
}

void CommandWrite(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    int fWriteSize = 0;

    fWriteSize = SYS_FS_FileWrite(fHandle, argv[1], strlen(argv[1]));
    if(fWriteSize != -1)
        SYS_CMD_PRINT("Write [%s](%d) to File!\r\n", argv[1], fWriteSize );	
    else
        SYS_CMD_MESSAGE("Write failure!\r\n");
}

---------------------------------------------------------------------
    { "open",  CommandOpen,  ": open $" },
    { "write", CommandWrite, ": write $" },

---------------------------------------------------------------------
void CommandRead(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    int fReadSize = 0;
    char fReadBuf[50] = "";
	
    SYS_FS_FileSeek(fHandle, 0, SYS_FS_SEEK_SET);
    fReadSize = SYS_FS_FileRead(fHandle, (void *)fReadBuf, atoi(argv[1]));
    if(fReadSize != -1)
        SYS_CMD_PRINT("Read [%s](%d) from File!\r\n", fReadBuf, fReadSize );	
    else
        SYS_CMD_MESSAGE("Read failure!\r\n");
}

void CommandClose(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    SYS_FS_FileClose(fHandle);
    SYS_CMD_MESSAGE("File Closed!\r\n");
}

---------------------------------------------------------------------
    { "read",  CommandRead,  ": read #" },
    { "close", CommandClose, ": Close file" },

---------------------------------------------------------------------
