I have create a FATFS VFS file system and mounted it at "/spiflash". When I attempt to use opendir("/spiflash") I get a failure (errno=2) however if I attempt to open a directory within my mounted file system (eg. opendir("/spiflash/myDir")) I get no error.
So my question becomes one of "Can I use opendir() on the root directory of a mounted FATFS/VFS file system?"
[Answered] Using opendir() on a FATFS VFS file system.
[Answered] Using opendir() on a FATFS VFS file system.
Last edited by kolban on Mon May 22, 2017 12:10 am, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Using opendir() on a FATFS VFS file system.
You may possibly have to call opendir("/spiflash/"). The fact that the form without the trailing slash doesn't work is likely a bug in VFS. Thanks for reporting.
Re: Using opendir() on a FATFS VFS file system.
Thank you sir. Using opendir("/spiflash/") worked as you suggested.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Who is online
Users browsing this forum: Majestic-12 [Bot] and 87 guests