Using SdFat with String

Hello everybody,

Having problem with the SD library (see my post "Problem with SD library" in the section "TroubleShooting), I am going to use the SdFat library.

I would like to know how to use the "printName" method to get the result in a String object.

Thank you for your help.


The following will get the file name for myFile and place it in an Arduino String.

  SdFile myFile;
  char tmp[13];

  // code to open mfFile goes here

  String name = tmp;

  // verify that the file name is in the String.

The output for a test case is:


Thank you Fat16lib, I just have to use the alternate method getFileName(char*).