Functions

file.inc

amxmodx 1.8.2 hg65

Function Type Description
LoadFileForMe native Loads a file using the LoadFileForMe engine function.

The data is truncated if there is not enough space. No null-terminator
is applied; the data is the raw contents of the file.
close_dir native This function has no description.
delete_file native Deletes file. Function returns 1 on success, 0 on failure.
dir_exists native Checks if a directory exists
fclose native This function has no description.
feof native This function has no description.
fflush native Flushes a buffered output stream.
fgetc native This function has no description.
fgets native This function has no description.
file_exists native Checks for file. If file exists function returns 1, in other case 0.
file_size native Returns a file size in bytes if flag is set to 0.
When flag is set to 1 returns number of lines in the file,
and when flags is 2, function returns 1 if the file ends
with line feed. If file doesn't exist returns -1.
filesize native This function has no description.
fopen native This function has no description.
fprintf native This function has no description.
fputc native This function has no description.
fputs native This function has no description.
fread native This function has no description.
fread_blocks native This function has no description.
fread_raw native This function has no description.
fseek native This function has no description.
ftell native This function has no description.
fungetc native This function has no description.
fwrite native This function has no description.
fwrite_blocks native This function has no description.
fwrite_raw native This function has no description.
mkdir native Returns 0 on success, like the POSIX specification
next_file native This function has no description.
open_dir native This function has no description.
read_dir native Reads content from directory.
Returns index of next element or 0 when end of dir. is reached.
read_file native Reads line from file. Returns index of next line or 0 when end of file is reached.
rename_file native renames a file. returns 0 on failure, 1 on success.
if relative true, rename_file will act like other natives which
use the moddir as a base directory. otherwise, the current directory is
undefined (but assumed to be hlds).
rmdir native This function has no description.
unlink native This function has no description.
write_file native Writes text to file. Function returns 0 on failure.
When line is set to -1, the text is added at the end of file.