# NNS_FndOpenArchiveFileByIndex

## Syntax

      #include <nnsys/fnd.h>

      BOOL NNS_FndOpenArchiveFileByIndex(FSFile* file, NNSFndArchive& archive, u32 index);

## Arguments

file | The pointer to the `FSFile` structure.
archive | The pointer to the `NNSFndArchive` structure.
index | The index value of the file.

## Return Values

Returns TRUE if the file is successfully opened.

## Description

This function uses the file system to open the file specified by `archive` and `index`. If the file is successfully opened, then it can be read using the file system's API. To close the file, use the file system's API (`FS_Close`).

        extern void* archiveBinary;

        NNSFndArchive archive;

        if (NNS_FndMountArchive(&archive, "ARC", archiveBinary))
        {
            FSFile file;

            FS_InitFile(&file);
            NNS_FndOpenArchiveFileByIndex(&file, &archive, 10);

            ......
            ......
        }

## See Also

`NNS_FndGetArchiveFileByIndex`

## Revision History

2004/05/14 Initial version.

CONFIDENTIAL