Fremove

From SA-MP Wiki

Jump to: navigation, search

fremove

Image:Farm-Fresh text lowercase.png Note: This function name starts with a lowercase letter.


Description:

Delete a file.


Parameters:
(name[])
name[]The path of the file to delete. (NOTE: NOT a file handle)


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The file doesn't exist, or you don't have permission to delete it.


Image:32px-Circle-style-warning.png

Important
Note

The file path must be valid.


Image:32px-Ambox_warning_orange.png

Note

Files that are currently open (fopen) must be closed first (fclose) to be deleted.


Example Usage:

fremove("Example.txt");

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


  • ftemp: Create a temporary file stream.
  • fremove: Remove a file.
  • fgetchar: Get a character from a file.
  • fseek: Jump to a specific character in a file.
  • fexist: Check, if a file exists.
  • fmatch: Check, if patterns with a file name matches.
In other languages