##### Shinobi Library - Memory Card Function

# buGetDiskFree

Gets free space on the memory card

### FORMAT

`

  Sint32 buGetDiskFree( drive, type )
  Sint32 drive
  Sint32 type

`

### PARAMETER

  `drive` | Extension socket number
  `type` | File type
  `` | BUD_FILETYPE_NORMAL:Normal file free space
  `` | BUD_FILETYPE_EXECUTABLE:Executable file free space

### RETURN

  0 or positive value | Number of free blocks |
  BUD_ERR_UNFORMAT | Not formatted |
  BUD_ERR_NO_DISK | Memory card not found |
  BUD_ERR_BUSY | A TYPE_B function is being processed |

### DESCRIPTION

  Returns a block of free space on a memory card inserted in an extension socket.

  The following values can be designated for `drive` that specifies operand 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

  Normally, file free space includes executable file free space.

### EXAMPLE

      Sint32 free;
      free = buGetDiskFree(BUD_DRIVE_A1, BUD_FILETYPE_NORMAL);
      if (free &lt; 0) return NG;

buGetDiskFree

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999