greiman / SdFat

Arduino FAT16/FAT32 exFAT Library
MIT License
1.07k stars 502 forks source link

Method for full path of cwd #239

Open rickyelqasem opened 3 years ago

rickyelqasem commented 3 years ago

Sorry if this is a duplicate as I have searched the internet. CWD() only returns the folder name of the cwd. Is there a method for getting the full path to the cwd ? for example /Great/Grand/Father/Child ? at the moment I'm handling it using an array but if that method existed I could save a bit of memory. thanks

greiman commented 3 years ago

It's impossible for exFAT since there is no . or .. entry in a directory. Its almost as bad for FAT16/FAT32. there is a .. entry but it only has the location of the parent on media, not the actual directory entry. You would then need to search . for an entry that had the same location on media as .. to find the name. I gave up the idea of a name for cwd.