Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to call close while listing files in SPIFFS with openNextFile #23

Closed
console-netsphere opened this issue Mar 9, 2021 · 1 comment

Comments

@console-netsphere
Copy link

console-netsphere commented Mar 9, 2021

Hi,

I've been taking a look at the LITTLEFS example LittleFS_test.ino, in particular to the listDir function.

I've noticed that the procedure doesn't make any call to the close method. It just keeps calling the openNextFile method until there are no more files available.

Isn't a call to the close method needed to make sure no resources are left hanging?

Regards

@console-netsphere
Copy link
Author

As far as I could understand a C++ smart pointer is responsible for closing the file when variable is overwritten or gets out of scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant