pf_opendir

The pf_opendir function opens a directory.

FRESULT pf_opendir (
  DIR* dp,          /* [OUT] Pointer to the blank directory object structure */
  const char* path  /* [IN]  Pointer to the directory name */
);

Parameters

dp
Pointer to the blank directory object to be created.
path
Pinter to the null-terminated string that specifies the directory name to be opened.

Return Values

FR_OK (0)
The function succeeded and the directory object is created. It is used for subsequent calls to read the directory entries.
FR_NO_FILE
Could not find the path.
FR_NOT_READY
The disk drive cannot work due to no medium in the drive or any other reason.
FR_DISK_ERR
The function failed due to a hard error in the disk function, a wrong FAT structure or an internal error.
FR_NOT_ENABLED
The volume has no work area.

Description

The pf_opendir() function opens an exsisting directory and creates the directory object for subsequent calls. The directory object structure can be discarded at any time without any procedure.

QuickInfo

Available when _USE_DIR == 1.

References

f_readdir, DIR

Return