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 SPIFFS_ftruncate function #278

Closed
wants to merge 2 commits into from

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Apr 4, 2021

This PR adds a SPIFFS_ftruncate function to hydrogen. It allows behaviour similar to POSIX ftruncate() call except it cannot be used to increase file size. It uses existing nucleus calls with additional checks.

@igrr
Copy link
Contributor

igrr commented Mar 16, 2022

@pellepl sorry for poking you directly. If we added unit tests to cover this new feature, would you consider merging this PR?

There is some interest in implementing truncate and ftruncate support, as evidenced by #218, #217, espressif/esp-idf#2234, espressif/esp-idf#2241.

We would like to avoid forking SPIFFS to add this one function.

@pellepl
Copy link
Owner

pellepl commented Mar 16, 2022 via email

@igrr
Copy link
Contributor

igrr commented Mar 17, 2022

Thanks @mikee47, your commit has now been merged as part of #287!

@mikee47
Copy link
Contributor Author

mikee47 commented Mar 18, 2022

@igrr Great, thank you!

@mikee47 mikee47 deleted the feature/spiffs-ftruncate branch March 18, 2022 07:58
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.

3 participants