1file_exists(3)                  Allegro manual                  file_exists(3)
2
3
4

NAME

6       file_exists - Tells if a file exists. Allegro game programming library.
7

SYNOPSIS

9       #include <allegro.h>
10
11
12       int file_exists(const char *filename, int attrib, int *aret);
13

DESCRIPTION

15       Checks  whether  a  file  matching  the  given name and attributes (see
16       beginning of this chapter) exists. If `aret' is not NULL,  it  will  be
17       set to the attributes of the matching file. Example:
18
19          /* Check for a normal file. */
20          if (file_exists("franken.dat", 0, NULL))
21             allegro_message("It is alive!\n");
22

RETURN VALUE

24       Returns non-zero if the file exists, or zero if it doesn't or the spec‐
25       ified attributes mask it out.
26
27

SEE ALSO

29       exists(3), file_size_ex(3), file_time(3)
30
31
32
33Allegro                          version 4.4.2                  file_exists(3)
Impressum