# FS_OpenTopLevelDirectory

## Syntax

    #include <nitro/fs.h>

    BOOL FS_OpenTopLevelDirectory(FSFile *dir);

## Arguments

dir | `FSFile` structure where the handle is stored

## Return Values

This function always succeeds and returns `TRUE`.

## Description

Opens the top-level directory that contains a list of the usable archive names.
If you call the `FS_ReadDirectory` function for the directory handler retrieved with this function, the archives that are currently mounted into the program are returned one at a time. The name of the mounted archive has a colon appended (for example, rom:).

## Notes

- This function cannot be called from the interrupt handler (IRQ mode). Also note that in some cases processing may not end if interrupts are disabled.
- 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`
`FS_ReadDirectory`
`FS_CloseDirectory`

## Revision History

2009/07/29 Added mention that copying structure values is not guaranteed.
2008/12/04 Initial version.

CONFIDENTIAL