## f_mkdir

The f_mkdir function creates a new directory.

    FRESULT f_mkdir (
      const char* DirName /* Pointer to the directory name */
    );

#### Parameter

DirName
  Pointer to the null-terminated string that specifies the directory name to create.

#### Return Value

FR_OK (0)
  The function succeeded.
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_DENIED
  The directory cannot be created due to directory table or disk is full.
FR_EXIST
  A file or directory that has same name is already existing.
FR_NOT_READY
  The disk drive cannot work due to no medium in the drive or any other reason.
FR_WRITE_PROTECTED
  The medium is write protected.
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 partition on the disk.

#### Description

The f_mkdir function creates a new directory. This function is not supported in read-only configuration and minimization level of >= 1.

#### Example

        res = f_mkdir("sub1");
        if (res) die(res);
        res = f_mkdir("sub1/sub2");
        if (res) die(res);
        res = f_mkdir("sub1/sub2/sub3");
        if (res) die(res);

Return