From cd5acb228cae597e7eff28527981f41699cfc441 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 29 Sep 2012 13:50:05 +0000 Subject: Extended the cFile interface with Printf() git-svn-id: http://mc-server.googlecode.com/svn/trunk@901 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/OSSupport/File.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/OSSupport/File.cpp') diff --git a/source/OSSupport/File.cpp b/source/OSSupport/File.cpp index fdae0b34e..7fbaf218f 100644 --- a/source/OSSupport/File.cpp +++ b/source/OSSupport/File.cpp @@ -269,3 +269,17 @@ bool cFile::Exists(const AString & a_FileName) + +int cFile::Printf(const char * a_Fmt, ...) +{ + AString buf; + va_list args; + va_start(args, a_Fmt); + AppendVPrintf(buf, a_Fmt, args); + va_end(args); + return Write(buf.c_str(), buf.length()); +} + + + + -- cgit v1.2.3