---
name: "al_create_file_handle"
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_create_file_handle"
---

# al\_create\_file\_handle(3)

Allegro 5 API

## NAME

al\_create\_file\_handle - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_FILE *al_create_file_handle(const ALLEGRO_FILE_INTERFACE *drv,
     void *userdata)
  ```

## DESCRIPTION

Creates an empty, opened file handle with some abstract user data. This allows custom interfaces to extend the [ALLEGRO\_FILE(3)](/ALLEGRO_FILE/3.md) struct with their own data. You should close the handle with the standard [al\_fclose(3)](/al_fclose/3.md) function when you are finished with it.

## SEE ALSO

[al\_fopen(3)](/al_fopen/3.md), [al\_fclose(3)](/al_fclose/3.md), [al\_set\_new\_file\_interface(3)](/al_set_new_file_interface/3.md)
