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

Telecommand: LFS delete file (#227) #233

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

KaleF07
Copy link
Contributor

@KaleF07 KaleF07 commented Nov 9, 2024

Resolves #227:

Summary

  • Included telecommand that uses LFS_delete_file helper function to delete a file from LFS
  • Accepts 1 argument: The name of the file to be deleted

@KaleF07 KaleF07 self-assigned this Nov 9, 2024
@KaleF07 KaleF07 added the pr-please-review Indicator for someone to review a PR label Nov 9, 2024
Copy link
Contributor

@NuclearTea NuclearTea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. This just needs to be tested.

@KaleF07 KaleF07 removed the pr-please-review Indicator for someone to review a PR label Nov 15, 2024
@vaibhavkpr
Copy link
Contributor

vaibhavkpr commented Nov 15, 2024

This all looks good. This just needs to be tested.

I was able to quickly test this using my NAND memory module. Looks good!
✅ Able to successfully delete a file if it exists.
✅ Reports appropriate error when trying to delete a file that doesn't exist.

Here are some things to consider that I found during testing (while not directly linked to the issue itself but worth getting investigated if possible):
⚠️ I'm unable to reach the "Error parsing file name arg" scenario when I send an empty string "" as an input. Also to note as a result "" is accepted as a parameter when creating a file. Able to reach case: 3 (filename too long for parsing) successfully.
⚠️ Able to send input both with and without "", are both ways acceptable? May be worth including in the arg doc so it is more clear.

@KaleF07
Copy link
Contributor Author

KaleF07 commented Nov 20, 2024

This all looks good. This just needs to be tested.

I was able to quickly test this using my NAND memory module. Looks good! ✅ Able to successfully delete a file if it exists. ✅ Reports appropriate error when trying to delete a file that doesn't exist.

Here are some things to consider that I found during testing (while not directly linked to the issue itself but worth getting investigated if possible): ⚠️ I'm unable to reach the "Error parsing file name arg" scenario when I send an empty string "" as an input. Also to note as a result "" is accepted as a parameter when creating a file. Able to reach case: 3 (filename too long for parsing) successfully. ⚠️ Able to send input both with and without "", are both ways acceptable? May be worth including in the arg doc so it is more clear.

Thank you for testing! I'll take a look into the issues and get them fixed right away! Passing a filename argument of "" should not be acceptable, there should be an error case for an empty argument.

@NuclearTea NuclearTea added command Related to implementing a telecommand pr-awaiting-testing pr-awaiting-changes labels Nov 21, 2024
Added notes to littleFS write and delete file telecommands to clarify how to pass arguments without the use of quotations.
@KaleF07
Copy link
Contributor Author

KaleF07 commented Nov 29, 2024

While looking through the code, I found that the "Error parsing file name arg" condition was trivial since passing no arguments to this telecommand prompts a telecommand parsing error. However, I will keep the statement in the code just to be safe.

I added a note in the doc string indicating to not add quotations around the argument when parsing fs_delete_file to reduce any confusion.

@KaleF07
Copy link
Contributor Author

KaleF07 commented Nov 29, 2024

another good thing to mention is that it might be nice to wait until Saksham's LFS telecommand list files [issue #7] is merged into main to merge this branch. - PR #216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command Related to implementing a telecommand pr-awaiting-testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filesystem: Telecommand to delete a file
3 participants