Skip to content

Commit

Permalink
mimic SDfat's getName()
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Apr 27, 2019
1 parent d60ae1f commit 0b4f6dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Adafruit_SPIFlash_FatFs.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class File : public Stream {
char* name() {
return _fileInfo.fname;
}
void getName(char *buf, uint16_t bufsize) {
strncpy(buf, _fileInfo.fname, bufsize);
}
bool isDirectory() {
return (_fileInfo.fattrib & AM_DIR) > 0;
}
Expand Down

0 comments on commit 0b4f6dd

Please sign in to comment.