diff options
author | madmaxoft <github@xoft.cz> | 2013-11-23 20:26:00 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-23 20:26:00 +0100 |
commit | 94e14e1ace16a265b8e58a186c308609c504d288 (patch) | |
tree | ce265c131f19bfcf43382a0bd0a80da5e84812c4 /source/OSSupport/File.cpp | |
parent | APIDump: Added more constant groups. (diff) | |
download | cuberite-94e14e1ace16a265b8e58a186c308609c504d288.tar cuberite-94e14e1ace16a265b8e58a186c308609c504d288.tar.gz cuberite-94e14e1ace16a265b8e58a186c308609c504d288.tar.bz2 cuberite-94e14e1ace16a265b8e58a186c308609c504d288.tar.lz cuberite-94e14e1ace16a265b8e58a186c308609c504d288.tar.xz cuberite-94e14e1ace16a265b8e58a186c308609c504d288.tar.zst cuberite-94e14e1ace16a265b8e58a186c308609c504d288.zip |
Diffstat (limited to 'source/OSSupport/File.cpp')
-rw-r--r-- | source/OSSupport/File.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/OSSupport/File.cpp b/source/OSSupport/File.cpp index 86276bd79..274aa52da 100644 --- a/source/OSSupport/File.cpp +++ b/source/OSSupport/File.cpp @@ -420,6 +420,22 @@ AStringVector cFile::GetFolderContents(const AString & a_Folder) +AString cFile::ReadWholeFile(const AString & a_FileName) +{ + cFile f; + if (!f.Open(a_FileName, fmRead)) + { + return ""; + } + AString Contents; + f.ReadRestOfFile(Contents); + return Contents; +} + + + + + int cFile::Printf(const char * a_Fmt, ...) { AString buf; |