# FS_OpenFileDirect

## Syntax

  `#include <nitro/fs.h>`
  `BOOL FS_OpenFileDirect(FSFile *p_file, FSArchive *p_arc, u32 image_top, u32 image_bottom, u32 file_index);`

## Arguments

p_file | Address of the `FSFile` structure.
`p_arc` | Address of the `FSArchive` structure to be associated
image_top | Offset for the beginning of the file region (memory space) specified by `p_arc`
image_bottom | Offset for the end of the file region (memory space) specified by `p_arc`
file_index | Index value to be allocated to the file

## Return Values

Returns TRUE if the file opens properly; FALSE otherwise.

## Description

This function opens the file by specifying the archive and its region directly. This function is used mainly to implement archives. It is valid only when the specified archive is loaded.

## 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.

## See Also

`FSFile`, `FSArchive`, `FS_GetFileImageTop`, `FS_GetFileImageBottom`

## Revision History

2004/09/24 Added the description in the Caution section regarding the conditions for calling this function.
2004/07/13 Initial version.

CONFIDENTIAL