##### Shinobi Library - Memory Card Function

# buDeleteFile

Deletes a file

### FORMAT

`

  Sint32 buDeleteFile( drive, *fname )
  Sint32 drive
  const char *fname

`

### PARAMETER

  `drive` | Extension socket number
  `*fname` | File name

### RETURN

  BUD_ERR_OK | Processing request was accepted |
  BUD_ERR_BUSY | Request could not be accepted because processing was in progress |

### DESCRIPTION

  Erases a file on a memory card inserted in a specified extension socket.

  The following values can be designated for the argument `drive` that specifies extension sockets.

  BUD_DRIVE_A1 | Extension socket 1 on board A
  BUD_DRIVE_A2 | Extension socket 2 on board A
  BUD_DRIVE_B1 | Extension socket 1 on board B
  BUD_DRIVE_B2 | Extension socket 2 on board B
  BUD_DRIVE_C1 | Extension socket 1 on board C
  BUD_DRIVE_C2 | Extension socket 2 on board C
  BUD_DRIVE_D1 | Extension socket 1 on board D
  BUD_DRIVE_D2 | Extension socket 2 on board D

### EXAMPLE

      Sint32 ret;
      ret = buDeleteFile(BUD_DRIVE_A1, "SAVEDATA");
      if (ret == BUD_ERR_OK) {
      /* Delete request was successful */
      } else {
      /* Delete request failed (BUSY) */
      }

### NOTE

  The following are the completion statuses for this function that are obtained by `buStat():`

  BUD_ERR_OK | Normal end
  BUD_ERR_NO_DISK | Memory card not found
  BUD_ERR_UNFORMAT | Disk is not formatted
  BUD_ERR_FILE_NOT_FOUND | File not found

  A deletion generally requires 5 Int (This time requirement may vary, depending on the status of other drives, etc.)

buDeleteFile

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999