I'm using the SDFat library and the
FatFile type has the functions:
bool FatFile::dirEntry(dir_t* dir)
Return a file's directory entry.
[out] dir Location for return of the file's directory entry.
The value true is returned for success and the value false is returned for failure.
uint8_t FatFile::dirName(const dir_t *dir, char *name)
Format the name field of dir into the 13 byte array name in standard 8.3 short name format.
[in] dir The directory structure containing the name.
[out] name A 13 byte char array for the formatted name.
length of the name.
From what I understand, I should be able to pass something like this into the functions:
dir_t Bass; char dName ; FatFile BrowseFile; BrowseFile.open("/Folder1/File1.txt", O_RDONLY); Serial.print(BrowseFile.dirEntry(&*Bass)); Serial.print(BrowseFile.dirName(Bass,*dName)); Serial.println(dName);
to which the program should output
1 [Folder1's 8.3 name length] [Folder1's 8.3 name]
However, I'm getting an error and I can't find any included examples that use these two functions in a sketch. if someone could explain what I'm doing wrong, it would be greatly appreciated.