2014-08-04 12:36:20 +04:00
|
|
|
// vim: set ts=4 sw=4 tw=99 noet:
|
|
|
|
//
|
|
|
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
|
|
|
// Copyright (C) The AMX Mod X Development Team.
|
|
|
|
//
|
|
|
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
|
|
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
|
|
|
// https://alliedmods.net/amxmodx-license
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
#include <stdio.h>
|
2004-08-22 13:28:09 +04:00
|
|
|
#include "CString.h"
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
// *****************************************************
|
|
|
|
// class File
|
|
|
|
// *****************************************************
|
|
|
|
|
|
|
|
class File
|
|
|
|
{
|
|
|
|
FILE* fp;
|
|
|
|
|
|
|
|
public:
|
2005-09-10 04:38:42 +04:00
|
|
|
File(const char* n, const char* m);
|
|
|
|
~File();
|
2005-09-17 03:48:51 +04:00
|
|
|
|
2005-09-10 04:38:42 +04:00
|
|
|
operator bool () const;
|
2005-09-17 03:48:51 +04:00
|
|
|
|
2005-09-10 04:38:42 +04:00
|
|
|
friend File& operator<<(File& f, const String& n);
|
|
|
|
friend File& operator<<(File& f, const char* n);
|
|
|
|
friend File& operator<<(File& f, const char& c);
|
|
|
|
friend File& operator<<(File& f, int n);
|
|
|
|
friend File& operator>>(File& f, String& n);
|
|
|
|
friend File& operator>>(File& f, char* n);
|
2005-09-17 03:48:51 +04:00
|
|
|
|
2005-09-10 04:38:42 +04:00
|
|
|
int getline(char* buf, int sz);
|
2005-09-17 03:48:51 +04:00
|
|
|
|
2005-09-10 04:38:42 +04:00
|
|
|
File& skipWs();
|
2004-01-31 23:56:22 +03:00
|
|
|
};
|