---
name: "al_read_directory"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_read_directory"
---

# al\_read\_directory(3)

Allegro 5 API

## NAME

al\_read\_directory - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_FS_ENTRY *al_read_directory(ALLEGRO_FS_ENTRY *e)
  ```

## DESCRIPTION

Reads the next directory item and returns a filesystem entry for it.

Returns NULL if there are no more entries or if an error occurs. Call [al\_destroy\_fs\_entry(3)](/al_destroy_fs_entry/3.md) on the returned entry when you are done with it.

This function will ignore any files or directories named `.` or `..` which may exist on certain platforms and may signify the current and the parent directory.

## SEE ALSO

[al\_open\_directory(3)](/al_open_directory/3.md), [al\_close\_directory(3)](/al_close_directory/3.md)
