|
N64FlashcartMenu
|
Implementation of Controller Pak file system utilities. More...
Functions | |
| bool | has_cpak (int controller) |
| Check if a Controller Pak is present in the given controller. | |
| int | get_block_size_from_fs_path (const char *filename_cpak) |
| Get the block size from a Controller Pak file system path. | |
| int | get_file_size_from_fs_path (const char *filename_cpak) |
| Get the file size from a Controller Pak file system path. | |
| void | unmount_all_cpakfs () |
| Unmount all Controller Pak file systems. | |
| int | inc_index_note (int current_index) |
| Increment a note index, wrapping around MAX_NUM_NOTES. | |
| int | dec_index_note (int current_index) |
| Decrement a note index, wrapping around MAX_NUM_NOTES. | |
| int | mount_cpakfs (int controller) |
| Mount the Controller Pak file system for a given controller. | |
| int | extract_title_from_absolute_path (const char *path, char *outbuf, size_t outbuf_size) |
| Extract the title from an absolute file path. | |
| int | parse_cpakfs_fullname (const char *fullname, cpakfs_path_strings_t *out) |
| Parse a Controller Pak full filename into its components. | |
| int | pick_unique_fullname_with_mount (const char *mount_prefix, const char *desired_name, char *out_fullpath, size_t outsz, int(*exists_fullpath)(const char *fullpath)) |
| Pick a unique full filename with mount prefix, avoiding collisions. | |
| int | file_exists_full (const char *full_mounted_path) |
| Check if a file exists at the given full mounted path. | |
Variables | |
| const char *const | CPAK_MOUNT_ARRAY [4] |
| Array of Controller Pak mount point strings. | |
Implementation of Controller Pak file system utilities.
| bool has_cpak | ( | int | controller | ) |
Check if a Controller Pak is present in the given controller.
| controller | The controller index (0-3). |
| int get_block_size_from_fs_path | ( | const char * | filename_cpak | ) |
Get the block size from a Controller Pak file system path.
| filename_cpak | The Controller Pak file path. |
| int get_file_size_from_fs_path | ( | const char * | filename_cpak | ) |
Get the file size from a Controller Pak file system path.
| filename_cpak | The Controller Pak file path. |
| int inc_index_note | ( | int | current_index | ) |
Increment a note index, wrapping around MAX_NUM_NOTES.
| current_index | The current note index. |
| int dec_index_note | ( | int | current_index | ) |
Decrement a note index, wrapping around MAX_NUM_NOTES.
| current_index | The current note index. |
| int mount_cpakfs | ( | int | controller | ) |
Mount the Controller Pak file system for a given controller.
| controller | The controller index (0-3). |
| int extract_title_from_absolute_path | ( | const char * | path, |
| char * | outbuf, | ||
| size_t | outbuf_size ) |
Extract the title from an absolute file path.
The title is the filename up to the first underscore or dot, or the whole filename if neither is present.
| path | The absolute file path. |
| outbuf | Output buffer for the title. |
| outbuf_size | Size of the output buffer. |
| int parse_cpakfs_fullname | ( | const char * | fullname, |
| cpakfs_path_strings_t * | out ) |
Parse a Controller Pak full filename into its components.
| fullname | The full filename string. |
| out | Output struct for parsed components. |
| int pick_unique_fullname_with_mount | ( | const char * | mount_prefix, |
| const char * | desired_name, | ||
| char * | out_fullpath, | ||
| size_t | outsz, | ||
| int(* | exists_fullpath )(const char *fullpath) ) |
Pick a unique full filename with mount prefix, avoiding collisions.
This function attempts to find a unique filename by incrementing the extension in base36 if needed.
| mount_prefix | The mount prefix (e.g., "cpak1:/"). |
| desired_name | The desired base filename. |
| out_fullpath | Output buffer for the unique full path. |
| outsz | Size of the output buffer. |
| exists_fullpath | Function pointer to check if a full path exists. |
| int file_exists_full | ( | const char * | full_mounted_path | ) |
Check if a file exists at the given full mounted path.
| full_mounted_path | The full mounted file path. |
| const char* const CPAK_MOUNT_ARRAY[4] |
Array of Controller Pak mount point strings.
Array of Controller Pak mount point strings (e.g., "cpak1:/").