This function allows you to obtain certain information about the files present in flash.
Syntax |
i32 f_dir (folder string, i32 ndef=0 [, stru_fileinfo stru[]=NULL]) |
---|---|
folder |
Full path to the directory/file. /fx/*.* where: •x is the folder identifier character (@, A, B, C, D, E, ...) NOTE1: If instead of *.* I enter the full name of a file in the /fx/ folder, I get information about the size of that file (e.g., /fa/stat.txt). NOTE2: If you are using an old flash-card with a Pentium CPU, then the folder field will only be /fx/ and not /fx/*.*. |
nDef |
Parameter containing the number of desired information (5 = 5 files) (optional, default 0) |
stru |
Array of stru_fileinfo that will contain information about the files found. (optional, default NULL--> desired information will not be saved) Name and size of files found in folder defined by folder will be saved. Must be at least nDef elements |
Result |
Returns the number of files present in the given partition |
Validity |
Task |
Note |
If functions regarding compact flash management are used, it is recommended that bit 14 of the sys_cfg variable (0x00004000) be imposed to 1, to enable the use of the safety routines for writing/reading flash |
Example of use:
|