## f_unlink

The f_unlink removes an object.

    FRESULT f_unlink (
      const XCHAR* FileName  /* Pointer to the object name */
    );

#### Parameter

FileName
  Pointer to the null-terminated string that specifies an object to be removed.

#### Return Values

FR_OK (0)
  The function succeeded.
FR_NO_FILE
  Could not find the file or directory.
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 function was denied due to either of following reasons:
  - The object has read-only attribute
  - The directory is not empty.
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 volume on the disk.

#### Description

The f_unlink function removes an object. Do not remove open objects and current directory.

#### QuickInfo

Available when `_FS_READONLY == 0` and `_FS_MINIMIZE == 0`.

Return