Please enable JavaScript to view this site.

This function allows you to obtain certain information about the files present in flash.

Syntax

i32 f_dir (string path, i32 ndef=0 [, stru_fileinfo stru[]=NULL])

path

Path to the directory containing the desired file (or more than one) or to the file itself.

If you want to refer to a specific file you must put the full path (e.g., "/fa/override.cfg").

If you want to refer to one (not directly) or more files you have to use the * character, where * replaces any character or string (e.g., "/fa/*.cfg" I request information about all files, regardless of name, with the cfg extension contained in the fa folder).

The folder identifier characters can be @, A, B, C, D, E, ... (e.g. /f@/, /fb/, ...).

NOTE1: If I enter the full name of a file in the folder, I get information about the size of the file itself (e.g., "/fa/stat.txt" I will get the size of the file 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 path 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

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC