# FS_SeekDir

## Syntax

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

Returns TRUE If the directory list position is correctly acquired; FALSE otherwise.

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

`FS_ReadDir()` | When the `is_directory` member in the acquired `FSDirEntry` structure is 1, the `dir_id` member indicates the beginning of the directory list.
`FS_TellDir()` | When it succeeds, the directory list's current position will be stored.

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

## Revision History

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

CONFIDENTIAL