|
wavelength 1.0.0
|
#include "memcard/memcarddirentry.h"
Go to the source code of this file.
Enumerations | |
| enum | MemcardOpenFlags { kMemcardOpenRead = 0x0001 , kMemcardOpenWrite = 0x0002 , kMemcardOpenCreate = 0x0200 } |
| Flags of MemcardOpenAndWait(). More... | |
Functions | |
| int | MemcardGetInfoAndWait (int nDevice, int *pnType, int *pnFree, int *pnFormat) |
| Report the state of the memory card of a device, waiting for the result. | |
| int | MemcardOpenAndWait (int nDevice, const char *pszPath, int nFlags) |
| Open a file of the memory card of a device, waiting for the result. | |
| int | MemcardCloseAndWait (int nFile) |
| Close a file of a memory card, waiting for the result. | |
| int | MemcardWriteAndWait (int nFile, const void *pData, int nBytes) |
| Write to a file of a memory card, waiting for the result. | |
| int | MemcardGetDirAndWait (int nDevice, const char *pszName, int nMaxEntries, int nMode, MemcardDirEntry **ppEntries) |
| List the entries of the memory card of a device that match a name, waiting for the result. | |
| enum MemcardOpenFlags |
Flags of MemcardOpenAndWait().
| Enumerator | |
|---|---|
| kMemcardOpenRead | Open for reading. |
| kMemcardOpenWrite | Open for writing. |
| kMemcardOpenCreate | Create the file when it does not exist. |
| int MemcardGetInfoAndWait | ( | int | nDevice, |
| int * | pnType, | ||
| int * | pnFree, | ||
| int * | pnFormat ) |
Report the state of the memory card of a device, waiting for the result.
The name is inferred. The device selects a port and a slot from a table.
| nDevice | The device. |
| pnType | Receives the card type, or null. |
| pnFree | Receives the free clusters, or null. |
| pnFormat | Receives whether the card is formatted, or null. |
| int MemcardOpenAndWait | ( | int | nDevice, |
| const char * | pszPath, | ||
| int | nFlags ) |
Open a file of the memory card of a device, waiting for the result.
The name is inferred.
| nDevice | The device. |
| pszPath | The path of the file. |
| nFlags | A set of MemcardOpenFlags. |
| int MemcardCloseAndWait | ( | int | nFile | ) |
Close a file of a memory card, waiting for the result.
The name is inferred.
| nFile | The descriptor of the file. |
| int MemcardWriteAndWait | ( | int | nFile, |
| const void * | pData, | ||
| int | nBytes ) |
Write to a file of a memory card, waiting for the result.
The name is inferred.
| nFile | The descriptor of the file. |
| pData | The bytes. |
| nBytes | The number of bytes. |
| int MemcardGetDirAndWait | ( | int | nDevice, |
| const char * | pszName, | ||
| int | nMaxEntries, | ||
| int | nMode, | ||
| MemcardDirEntry ** | ppEntries ) |
List the entries of the memory card of a device that match a name, waiting for the result.
The name is inferred. At most 20 entries are listed. The listing callback records the entries and not the count, and the call therefore always returns -1.
| nDevice | The device. |
| pszName | The path, optionally ending in a wildcard. |
| nMaxEntries | The most entries to list. |
| nMode | Zero to start a listing, nonzero to continue it. |
| ppEntries | Receives the entries. |