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

Adding scan_files and get_filesize functions #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gerard-170
Copy link

This PR cover the following issue:
#101

Adding scan_files and get_filesize functions, at the same time modifying get_filesize calling and ftp.fil.obj.objsize struct attribute for a correct file size retrieval using newer vesions of fatfs middleware.

Environment:
STMCubeIDE: 1.16.1
FatFS version: R0.12c

MODS:
As mention before, some file struct calls have been modified:

CWD_CMD modifications:

  • get_filesize call modified, now it only needs 'arg' argument. 'tmpstr' variable and "arg[slen - 3] = 0x00" are not used. Not sure why they were implemented in the first time, but could be helpful any explanation ?

SIZE_CMD modifications:

  • *tmpstr = 0 this line was deleted since it was supposed to get file size since any file location (including sub directories) deleting "/" mark does not help to retrieve information file info using FatFS API. Again, What's the main purpose for this?

Any comment or concerns are welcome.

…ing get_filesize calling and ftp.fil.obj.objsize struct attribute for a correct file size retrieval using newer vesions of fatfs middleware
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.

1 participant