File time support routines return the current date and time. More...
Functions | |
fsStatus | ftime_set (const char *path, fsTime *create, fsTime *access, fsTime *write) |
Set file or directory timestamp. | |
fsStatus | ftime_get (const char *path, fsTime *create, fsTime *access, fsTime *write) |
Get file or directory timestamp. | |
fsStatus | fs_get_time (fsTime *time) |
Callback function used to provide the current date and time to the File System. | |
File time support routines return the current date and time.
They can be used to set the file timestamp. The file timestamp information is available in devices with the FAT file system, it is not supported for non-FAT volumes.
Callback function used to provide the current date and time to the File System.
[out] | time | Pointer to the fsTime structure. |
The function fs_get_time function returns a time value.
The argument time is a pointer to the values of the hour, minute, second, day, month, and year in a fsTime structure.
Code Example
Get file or directory timestamp.
[in] | path | string specifying the file or directory path. |
[out] | create | fsTime structure for storing the create time. |
[out] | access | fsTime structure for storing the last access time. |
[out] | write | fsTime structure for storing the last write time. |
The function ftime_get retrieves the file or directory timestamp information.
The path argument is specifying the file or directory path. If the drive prefix is omitted, the Current Drive is used.
The argument create is specifying a pointer to the fsTime structure where the create time will be stored and can be NULL.
The argument access is specifying a pointer to the fsTime structure where the last access time will be stored and can be NULL.
The argument write is specifying a pointer to the fsTime structure where the last write time will be stored and can be NULL.
The timestamp of the corresponding argument is not retrieved if that argument equals to NULL.
Code Example
Set file or directory timestamp.
[in] | path | string specifying the file or directory path. |
[in] | create | fsTime structure specifying the create time. |
[in] | access | fsTime structure specifying the last access time. |
[in] | write | fsTime structure specifying the last write time. |
The function ftime_set sets the file or directory timestamp information.
The path argument is specifying the file or directory path. If the drive prefix is omitted, the Current Drive is used.
The argument create is specifying a pointer to the fsTime structure containing the create time and can be NULL.
The argument access is specifying a pointer to the fsTime structure containing the last access time and can be NULL.
The argument write is specifying a pointer to the fsTime structure containing the last write time and can be NULL.
The timestamp of the corresponding argument is not modified if that argument equals to NULL.
Code Example