updated header | readded double include prevention

This commit is contained in:
Felix Geyer
2004-02-21 20:30:04 +00:00
parent 16d8a7a210
commit 87b4d3570f
15 changed files with 287 additions and 213 deletions

View File

@ -1,20 +1,25 @@
/* Files functions
*
* (c) 2002-2004, OLO
* modified by the AMX Mod X Development Team
* by the AMX Mod X Development Team
* originally developed by OLO
*
* This file is provided as is (no warranties).
*/
#if defined _file_included
#endinput
#endif
#define _file_included
/* Reads content from directory.
* Returns index of next element or 0 when end of dir. is reached. */
* Returns index of next element or 0 when end of dir. is reached. */
native read_dir(const dirname[],pos,output[],len,&outlen);
/* Reads line from file. Returns index of next line or 0 when end of file is reached. */
native read_file(const file[],line,text[],len,&txtlen);
/* Writes text to file. Function returns 0 on failure.
* When line is set to -1, the text is added at the end of file. */
* When line is set to -1, the text is added at the end of file. */
native write_file(const file[],const text[],line = -1);
/* Deletes file. Function returns 1 on success, 0 on failure. */
@ -24,7 +29,7 @@ native delete_file(const file[]);
native file_exists(const file[]);
/* 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. */
* 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. */
native file_size(const file[], flag=0);