FatFs - f_opendir

## f_opendir

The f_opendir function opens a directory.

    FRESULT f_opendir (
      DIR* DirObject,       /* Pointer to the blank directory object structure */
      const XCHAR* DirName  /* Pointer to the directory name */
    );

#### Parameters

DirObject
  Pointer to the blank directory object to be created.
DirName
  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_PATH
  Could not find the path.
FR_INVALID_NAME
  The path name is invalid.
FR_INVALID_DRIVE
  The drive number is invalid.
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 an error in the disk function.
FR_INT_ERR
  The function failed due to a wrong FAT structure or an internal error.
FR_NOT_ENABLED
  The logical drive has no work area.
FR_NO_FILESYSTEM
  There is no valid FAT volume on the disk.

#### Description

The f_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 `_FS_MINIMIZE <= 1`.

#### See Also

`f_readdir, DIR`

Return