Detailed information about an open file, such as size and date/time stamps, can be obtained using the FSFile_Query()
function :The (see Listing - Example FSFile_Query() usage).
Code Block | ||||
---|---|---|---|---|
| ||||
FS_ENTRY_INFO |
...
info;
FSFile_Query(p_file, /* file pointer */
&info, /* pointer to info structure */
&err); /* return error */ |
contains the file attributes (see
Attrib
...
...
Attributes).The FS_ENTRY_INFO
structure has the following members:
Size
is the size of the file, in octets.DateTimeCreate
is the creation timestamp of the file.DateAccess
is the access timestamp (date only) of the file.DateTimeWr
is the last write (or modification) timestamp of the file.BlkCnt
is the number of blocks allocated to the file. For a FAT file system, this is the number of clusters occupied by the file data.BlkSize
is the size of each block allocated in octets. For a FAT file system, this is the size of a cluster.
DateTimeCreate
, DateAccess
and DateTimeWr
are structures of type CLK_TS_SEC.