al_set_physfs_file_interface(3alleg5)

al_set_physfs_file_interface3alleg5

Allegro 5 api

Usage

#include <allegro5/allegro_physfs.h>
void al_set_physfs_file_interface(void)

Overview

This function sets both the ALLEGRO_FILE_INTERFACE(3alleg5) and ALLEGRO_FS_INTERFACE(3alleg5) for the calling thread.

Subsequent calls to al_fopen(3alleg5) on the calling thread will be handled by PHYSFS_open(). Operations on the files returned by al_fopen(3alleg5) will then be performed through PhysicsFS. Calls to the Allegro filesystem functions, such as al_read_directory(3alleg5) or al_create_fs_entry(3alleg5), on the calling thread will be diverted to PhysicsFS.

To remember and restore another file I/O backend, you can use al_store_state(3alleg5)/al_restore_state(3alleg5).

Note: due to an oversight, this function differs from al_set_new_file_interface(3alleg5) and al_set_standard_file_interface(3alleg5) which only alter the current ALLEGRO_FILE_INTERFACE(3alleg5).

Note: PhysFS does not support the text-mode reading and writing, which means that Windows-style newlines will not be preserved.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

From allegro5-doc 2:5.2.10.1+dfsg-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.