Author Topic: Error to Creating Folder , not File  (Read 3564 times)

Offline Manish

  • Newbie
  • *
  • Posts: 23
    • View Profile
Error to Creating Folder , not File
« on: November 15, 2010, 01:10:44 PM »
Hi Mark,  Actually I tried and solved problem to creating file and memory related issue but while I am trying to create a folder it code hang and if I am trying to generate Text file , it create and I can write/read but I could not create file in Folder . can you hint  if need any changes. I am sending below operation for creating folder and file. Please check it.





      if(fnDoDisk(DO_CHANGE_DIR,"Test Folder")!=UTFAT_SUCCESS)//open Year Directory
      {
         fnDebugMsg("\nDir");
         fnDoDisk(DO_NEW_DIR"Test Folder");//create Year  directory
           
            if(fnDoDisk(DO_CHANGE_DIR,"Test Folder")!=UTFAT_SUCCESS)//open Year
                     {  return ; //Folder not opened}

      }
//------Create File as per Hour and Min

//------Create file for Writing

         if(fnDoDisk(DO_NEW_FILE,"Test File.TXT",0,0)==UTFAT_SUCCESS) //open Min text File
         {
            fnDebugMsg("\nWrite File ");
   //         fnDoDisk_RTU(DO_WRITE_FILE,"Test File.TXT",&ByteToWrite[0],ByteTolen);
            fnDoDisk(DO_WRITE_FILE,FileName1,&ByteToWrite[0],ByteTolen);
   
         }


Thank you
Manish Dabhi

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3061
    • View Profile
    • uTasker
Re: Error to Creating Folder , not File
« Reply #1 on: November 15, 2010, 03:35:53 PM »
Hi Manish

fnDoDisk() is an interface in the debug command line menu and not actually an utFAT API command.

It looks as though you extended it with additional parameters and have a second version called fnDoDisk_RTU().

Therefore I don't know what is actually being done and expect a potential problem in the additional interface.

I would try to work with the utFAT API commands directly. Also try to use the simulator to test this interface since it should be simpler to identify problems.

Regards

Mark