.\" Generated by the Allegro makedoc utility .TH file_exists 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME file_exists \- Tells if a file exists. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B int file_exists(const char *filename, int attrib, int *aret); .SH DESCRIPTION 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: .nf /* Check for a normal file. */ if (file_exists("franken.dat", 0, NULL)) allegro_message("It is alive!\\n"); .fi .SH "RETURN VALUE" Returns non-zero if the file exists, or zero if it doesn't or the specified attributes mask it out. .SH SEE ALSO .BR exists (3alleg4), .BR file_size_ex (3alleg4), .BR file_time (3alleg4)