|
whiskers 0.2.0
RP2350 BadUSB Tool
|
File struct to be used in file operations. More...
#include <shared.h>
Data Fields | |
| char * | filename |
| size_t | fsize |
| uint8_t | fattrs |
| uint16_t | fdate |
| uint16_t | ftime |
| void * | _internal_fp |
| bool | _internal_has_file |
| HAL_ERROR | errno |
File struct to be used in file operations.
This file struct is used primarily for 3 things:
Anything that has the prefix _internal should NEVER be modified in user code!
All the file information fields (ie. the name, size, etc.) are only filled out by ffstat and ffreadir. ffopen does NOT do this!
| void* hal_file::_internal_fp |
Internal file pointer. DO NOT TOUCH THIS!
| bool hal_file::_internal_has_file |
Internal to check whether or not a file is opened in this struct. This can be reference to see if this file struct needs to be closed or can open a file
| HAL_ERROR hal_file::errno |
Error number returned by the f* functions. This is only set if an actual error occured. See shared.h on how to convert these into strings.
| uint8_t hal_file::fattrs |
Access modifiers. You can typically ignore these as they're FatFS specific and have no real purpose in this project.
| uint16_t hal_file::fdate |
Date file was last modified.
| char* hal_file::filename |
The filename returned by either ffstat or the directory functions that return file info. This is allocated internally and will be changed with some functions calls. This is noted in the documentation of those functions.
| size_t hal_file::fsize |
Size of the file.
| uint16_t hal_file::ftime |
Time file was last modified.