Informations

Auteur(s) Olivier Martin
Date limite Pas de date limite
Limite de soumission Pas de limite
Étiquettes de catégories S5, Files, Level 2

Etiquettes

Se connecter

[S5] File exists

Estimated time: 10 minutes

Using open(2), determine if a file exists. Read the documentation to know how to do that, especially the parts about the flags you can use.

Note : you can only use open() and close().


File exist
/*
 * @pre filename != NULL
 * @post return 0 if the file {filename} exist. -1 Otherwise.
 */
 int file_exists(char *filename)