|
libnds
|
Support for custom user-implemented filesystems. More...
#include <dirent.h>#include <stdio.h>#include <stdlib.h>#include <sys/fcntl.h>#include <sys/stat.h>#include <sys/statvfs.h>#include <sys/time.h>#include <sys/times.h>#include <sys/unistd.h>#include <time.h>#include <unistd.h>#include <utime.h>Data Structures | |
| struct | device_io_t |
| This struct defines the interface with the user-provided device. More... | |
Macros | |
| #define | DEVICE_IO_MAX_DEVICES 5 |
| Maximum number of devices that can be defined by the user. | |
| #define | DEVICE_IO_MAX_DRIVE_NAME_LENGTH 20 |
| This is the maximum length of a device I/O drive name. | |
Functions | |
| int | deviceIoAdd (const device_io_t *dev) |
| Adds a new device. | |
| const device_io_t * | deviceIoGetFromIndex (int index) |
| Returns the device interface at the specified index. | |
| int | deviceIoGetIndexFromDrive (const char *drive) |
| Returns the device index that corresponds to the specified drive name. | |
| int | deviceIoRemove (int index) |
| Removes the device at the specified device index. | |
Support for custom user-implemented filesystems.
By default, libnds supports the NitroFS and FAT filesystems (DLDI, DSi SD and DSi NAND). The functions in this module allow the developer to define additional filesystems that can be accessed with the standard C functions (like fopen() or stat()).
| int deviceIoAdd | ( | const device_io_t * | dev | ) |
Adds a new device.
| dev | The device to be added. |
| const device_io_t * deviceIoGetFromIndex | ( | int | index | ) |
Returns the device interface at the specified index.
| index | The device index. |
| int deviceIoGetIndexFromDrive | ( | const char * | drive | ) |
Returns the device index that corresponds to the specified drive name.
| drive | The drive name without colon or slash (for example, "nitro" or "fat"). |
| int deviceIoRemove | ( | int | index | ) |
Removes the device at the specified device index.
| index | The index of the device to remove (the one returned by deviceIoAdd()). |