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

IFS attribute enumeration support #2318

Merged
merged 14 commits into from
Apr 29, 2021

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Apr 27, 2021

This PR implements a mechanism for efficiently enumerating file attributes. This is necessary for file copying, filtering, etc.

IFS

Add IFileSystem fenumxattr and enumxattr methods
Add OpenFlag::NoFollow to support enumeration of mountpoint objects
Add creationTime field to IFileSystem::Info
Fix issue where Directory class size/count keeps increasing if rewind() used
Revise test application to use LittleFS for Hybrid tests

LittleFS

Re-mount after format if appropriate
Use ACL for root directory as default (consistent with FWFS behaviour)
ACL stored in separate read/write entries; existing LittleFS partitions must be rebuilt.

Hybrid filesystem

Add check in mount() to ensure provided filesystem is writeable
In mount() copy root ACL from FWFS to use as default
Ensure parent direcotories are created in open() method
Repeat tests for both SPIFFS and LittleFS variants

Basic_IFS sample

Update to demonstrate enumeration

@mikee47 mikee47 changed the title Add IFS attribute enumeration support IFS attribute enumeration support Apr 27, 2021
@slaff slaff added this to the 4.3.1 milestone Apr 27, 2021
@slaff
Copy link
Contributor

slaff commented Apr 27, 2021

@mikee47 Please rebase this PR.

@mikee47 mikee47 force-pushed the feature/ifs-enum-attributes branch from a0c4ed5 to 6d94bcb Compare April 27, 2021 20:02
@mikee47
Copy link
Contributor Author

mikee47 commented Apr 28, 2021

@slaff I've noticed some weird stuff going on with the hybrid tests - investigating

@mikee47
Copy link
Contributor Author

mikee47 commented Apr 28, 2021

@slaff OK found and fixed

mikee47 added 3 commits April 28, 2021 10:40
Fix `FileSystem::makedirs` - end of path could be a filename
Fix duplicate files in hybrid readdir() - files not hidden as they should be
@mikee47 mikee47 force-pushed the feature/ifs-enum-attributes branch from 44258d8 to a588550 Compare April 28, 2021 09:41
@mikee47 mikee47 force-pushed the feature/ifs-enum-attributes branch from b359949 to d2d26a4 Compare April 28, 2021 15:29
@slaff
Copy link
Contributor

slaff commented Apr 29, 2021

@mikee47 are you ready with this PR?

@mikee47
Copy link
Contributor Author

mikee47 commented Apr 29, 2021

@slaff All done thanks

@slaff slaff merged commit 1437b23 into SmingHub:develop Apr 29, 2021
@mikee47 mikee47 deleted the feature/ifs-enum-attributes branch May 3, 2021 11:17
@slaff slaff mentioned this pull request May 5, 2021
5 tasks
slaff pushed a commit that referenced this pull request Sep 27, 2021
This PR implements a mechanism for efficiently enumerating file attributes. This is necessary for file copying, filtering, etc.

**IFS**

Add IFileSystem `fenumxattr` and `enumxattr` methods
Add `OpenFlag::NoFollow` to support enumeration of mount point objects
Add creationTime field to `IFileSystem::Info`
Fix issue where `Directory` class size/count keeps increasing if `rewind()` used
Revise test application to use LittleFS for Hybrid tests

**LittleFS**

Re-mount after format if appropriate
Use ACL for root directory as default (consistent with FWFS behaviour)
ACL stored in separate read/write entries; existing LittleFS partitions must be rebuilt.

**Hybrid file system**

Add check in mount() to ensure provided filesystem is writable
In mount() copy root ACL from FWFS to use as default
Ensure parent directories are created in open() method
Repeat tests for both SPIFFS and LittleFS variants

**Basic_IFS sample**

Update to demonstrate enumeration
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

Successfully merging this pull request may close these issues.

2 participants