summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/OSSupport/File.cpp14
-rw-r--r--source/OSSupport/File.h2
2 files changed, 16 insertions, 0 deletions
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());
+}
+
+
+
+
diff --git a/source/OSSupport/File.h b/source/OSSupport/File.h
index f3d21d450..5e7cd4431 100644
--- a/source/OSSupport/File.h
+++ b/source/OSSupport/File.h
@@ -95,6 +95,8 @@ public:
/// Returns true if the file specified exists
static bool Exists(const AString & a_FileName);
+ int Printf(const char * a_Fmt, ...);
+
private:
#ifdef USE_STDIO_FILE
FILE * m_File;