# FS_OpenFileFast

## Syntax

  `#include <nitro/fs.h>`
  `BOOL FS_OpenFileFast( FSFile *p_file, FSFileID file_id );`

## Arguments

p_file | Address of the `FSFile` structure.
file_id | File ID specified by `file_id` in the `FSDirEntry` structure

## Return Values

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

## Description

Uses the specified ID to open a file. Use the `FS_ReadDir` function to get the ID. When using the `FS_ReadDirectory` function, the obtained ID (`FSDirectoryEntryInfo.id`) format is not a `FSFile` structure, so you must directly set arc and file_id using the separately prepared `FSFile` structure.

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

`FSFileID`
`FSFile`
`FS_OpenFileEx`
`FS_CloseFile`
`FS_GetFileLength`
`FS_ReadFile`
`FS_SeekFile`
`FS_SeekFileToBegin`
`FS_SeekFileToEnd`
`FS_ReadDir`
`FSDirEntry`
`FS_ReadDirectory`
`FSDirectoryEntryInfo`

## Revision History

2009/07/29 Added mention that copying structure values is not guaranteed.
2009/07/16 Added description of restriction applied when using `FS_ReadDirectory`.
2008/10/02 Revised See Also.
2004/11/02 Changed the argument name.
2004/09/24 Added text under Note regarding the conditions for calling this function.
2004/05/14 Changed ID type from `u32` to `FSFileID`.
2004/04/02 Changed "file system" to "ROM file system."
2004/04/01 Initial version.

CONFIDENTIAL