f_stat

The f_stat gets the file status.

FRESULT f_stat (
  const char* FileName,  // Pointer to the file or directory name
  FILINFO* FileInfo      // Pointer to the FILINFO structure
);

Parameters

FileName
Pointer to the null-terminated string that specifies the file or directory name to get the information .
FileInfo
Pointer to the FILINFO structure to store the information.

Return Values

FR_OK
The function succeeded.
FR_NOPATH
Could not find the path.
FR_INVALID_NAME
The file name is invalid.
FR_NOT_READY
The disk drive cannot work due to no medium in the drive or any other reason.
FR_RW_ERROR
Any error occured in low level disk I/O.
FR_INCORRECT_DISK_CHANGE
Incorrect disk removal, such as a medium change during any file opend, has been occured.
FR_NOT_ENABLED
FatFs module has not been enabled.
FR_NO_FILESYSTEM
There is no valid FAT partition on the disk.

Description

The f_stat gets the information of a file or directory. For details of the infomation, refer to the FILINFO structure.

References

f_opendir, f_readdir, FILINFO

Return