romfs.h File Reference

RomFS driver. More...

`#include <3ds/types.h>`
`#include <3ds/services/fs.h>`

Go to the source code of this file.

## Data Structures

struct | romfs_header
| RomFS header. More...
struct | romfs_dir
| RomFS directory. More...
struct | romfs_file
| RomFS file. More...

## Functions

Result | romfsMountSelf (const char *name)
| Mounts the Application's RomFS. More...
Result | romfsMountFromFile (Handle fd, u32 offset, const char *name)
| Mounts RomFS from an open file. More...
Result | romfsMountFromCurrentProcess (const char *name)
| Mounts RomFS using the current process host program RomFS. More...
Result | romfsMountFromTitle (u64 tid, FS_MediaType mediatype, const char *name)
| Mounts RomFS from the specified title. More...
Result | romfsUnmount (const char *name)
| Unmounts the RomFS device.
static Result | romfsInit (void)
| Wrapper for romfsMountSelf with the default "romfs" device name.
static Result | romfsExit (void)
| Wrapper for romfsUnmount with the default "romfs" device name.

## Detailed Description

RomFS driver.

## Function Documentation

## romfsMountFromCurrentProcess()

Result romfsMountFromCurrentProcess | ( | const char * | name | ) |

Mounts RomFS using the current process host program RomFS.

Parameters

  name | Device mount name.

## romfsMountFromFile()

Result romfsMountFromFile | ( | Handle | fd,
|  | u32 | offset,
|  | const char * | name
| ) |  |

Mounts RomFS from an open file.

Parameters

  fd | FSFILE handle of the RomFS image.
  offset | Offset of the RomFS within the file.
  name | Device mount name.

## romfsMountFromTitle()

Result romfsMountFromTitle | ( | u64 | tid,
|  | FS_MediaType | mediatype,
|  | const char * | name
| ) |  |

Mounts RomFS from the specified title.

Parameters

  tid | Title ID
  mediatype | Mediatype
  name | Device mount name.

## romfsMountSelf()

Result romfsMountSelf | ( | const char * | name | ) |

Mounts the Application's RomFS.

Parameters

  name | Device mount name.

Remarks
  This function is intended to be used to access one's own RomFS. If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX. If on the other hand it's an NCCH, it behaves identically to romfsMountFromCurrentProcess.