From 94e14e1ace16a265b8e58a186c308609c504d288 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 23 Nov 2013 20:26:00 +0100 Subject: Added cFile:ReadWholeFile() to Lua API. --- source/OSSupport/File.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/OSSupport/File.h') diff --git a/source/OSSupport/File.h b/source/OSSupport/File.h index 70f81c8d2..01663a229 100644 --- a/source/OSSupport/File.h +++ b/source/OSSupport/File.h @@ -121,6 +121,9 @@ public: /// Creates a new folder with the specified name. Returns true if successful. Path may be relative or absolute static bool CreateFolder(const AString & a_FolderPath); + /// Returns the entire contents of the specified file as a string. Returns empty string on error. + static AString ReadWholeFile(const AString & a_FileName); + // tolua_end /// Returns the list of all items in the specified folder (files, folders, nix pipes, whatever's there). -- cgit v1.2.3