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

Add support for attributes in VFS (IDFGH-13326) #14248

Open
josesimoes opened this issue Jul 25, 2024 · 2 comments
Open

Add support for attributes in VFS (IDFGH-13326) #14248

josesimoes opened this issue Jul 25, 2024 · 2 comments
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF

Comments

@josesimoes
Copy link
Contributor

Is your feature request related to a problem?

Currently virtual file system doesn't provide support for attributes, which is something rather "basic" in a file system.

Describe the solution you'd like.

This doesn't need to be anything fancy, simple ones like hidden, read-only, system would be quite enough.
All file systems that VFS tapps into offer this: FatFS, littlefs, SPIFFS.

Describe alternatives you've considered.

No response

Additional context.

Stumbled into this when making the migration from SPIFFs to littlefs for the flash storage in .NET nanoFramework nanoframework/nf-interpreter#2911.

Already discussed it with the author of littlefs for ESP extension. Please see issue here joltwallet/esp_littlefs#196.
It seems that there is path forward, still I believe it would be nice to have a couple of API to get and set attributes.

@josesimoes josesimoes added the Type: Feature Request Feature request for IDF label Jul 25, 2024
@github-actions github-actions bot changed the title Add support for attributes in VFS Add support for attributes in VFS (IDFGH-13326) Jul 25, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 25, 2024
@igrr
Copy link
Member

igrr commented Jul 25, 2024

@josesimoes what would be the equivalent API you would use on a POSIX platform for this purpose?

@josesimoes
Copy link
Contributor Author

I suppose the more suitable one would be chmod, right?
Still, hidden files would be missing because the current implementation lacks support for . started filenames, as stated in the docs.

I would suggest a more generic approach, such as providing setattr and getattr that accepts (or returns) an uint32 and then it's up to the file system to store and retrieve that number. It's up to the application layer to use as it sees fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

3 participants