# FS_SeekDir

## C Specification

  `#include <nitro/fs.h>`
  `BOOL FS_SeekDir( FSFile *p_dir, const FSDirPos *p_pos );`

## Arguments

p_dir | Address of the `FSFile` structure
p_pos | The `FSDirPos` structure in which the directory list position is stored.

## Return Values

If the directory list position is correctly acquired, it returns a value of TRUE. Otherwise it returns a value of FALSE.

## Description

This function acquires the directory list, including the position in the list. The value of `FSDirPos` indicates the position. Use the following method to obtain it.

The `FS_ReadDir` function | When the `is_directory` element in the acquired `FSDirEntry` structure is 1, the `dir_id` element expresses the beginning of the directory list.
The `FS_TellDir` function | When it succeeds, the directory list's current position will be stored.

## Caution

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`, FSDirEntry, FSDirPos, FS_FindDir, FS_ReadDir, FS_TellDir, FS_RewindDir

## Revision History

09/24/2004 Added the description in the Caution section regarding the conditions for calling this function.
05/14/2004 Revised description due to changes in `FSDirPos`.
04/08/2004 Revised description due to the integration of `FSDir` and `FSFile`
04/01/2004 Initial version

CONFIDENTIAL