# FS_CreateFileFromRom

## Syntax

  `#include <nitro/fs.h>`
  `BOOL FS_CreateFileFromRom(FSFile *p_file, u32 offset, u32 size);`

## Arguments

p_file | Address of the `FSFile` structure.
offset | Offset for start of CARD-ROM region for the read.
size | Byte size of the target region from the offset.

## Return Values

`TRUE` if the file opens properly; `FALSE` otherwise.

## Description

Treats the specified CARD-ROM region as a temporary file and opens the file. The file opened by this function supports only these following functions. ``

- `FS_SeekFile`, `FS_SeekFileToBegin`, `FS_SeekFileToEnd`
- `FS_ReadFile`
- `FS_ReadFileAsync`
- `FS_CloseFile`

For more information, see the explanation for the `ROM Archive` function.

## Note

- This function cannot be called from the interrupt handler (IRQ mode).
  Also note that in some cases processing may not end if interrupts are left prohibited.
- Because the structures of opened files are linked with system resources, you cannot move or duplicate the information in these structures by copying them into other structures. For details, see the `FSFile` structure.

## See Also

`FSFile`
`FSArchive`
ROM Archive

## Revision History

2009/07/29 Added mention that copying structure values is not guaranteed.
2005/06/28 Initial version.

CONFIDENTIAL