file_exists(3alleg)

file_exists3alleg

Tells if a file exists. allegro game programming library.

Usage

#include <allegro.h>

int file_exists(const char *filename, int attrib, int *aret);

Overview

Checks whether a file matching the given name and attributes (see beginning of this chapter) exists. If `aret' is not NULL, it will be set to the attributes of the matching file. Example:

   /* Check for a normal file. */
   if (file_exists("franken.dat", 0, NULL))
      allegro_message("It is alive!\n");

Return value

Returns non-zero if the file exists, or zero if it doesn't or the specified attributes mask it out.

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.