Fexist

From SA-MP Wiki

Jump to: navigation, search

Fexist


Checks if a specific file exists in your scriptfiles directory.


Parameters:
(name[])
name[]The file to search for


Returnstrue if it exists and false if it doesn't exist.


if(!fexist("myfile.txt")
{
   print("Your file does not exist");
}
else
{
   new File:fhandle = fopen("myfile.txt",io_append);
   fwrite(fhandle,"mytext");
   fclose(fhandle);
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools