Browse Source

Merge pull request #1092 from AtomicGameEngine/JME-ATOMIC-FileGetText

Add overload for File::ReadText which returns string
JoshEngebretson 9 years ago
parent
commit
6e02655f2a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/Atomic/IO/File.h

+ 3 - 0
Source/Atomic/IO/File.h

@@ -116,6 +116,9 @@ public:
     /// Reads a text file, ensuring data from file is 0 terminated
     virtual void ReadText(String& text);
 
+    /// Reads a text file, ensuring data from file is 0 terminated
+    virtual String ReadText() { String retValue; ReadText(retValue); return retValue; }
+
     /// Return the fullpath to the file
     const String& GetFullPath() const { return fullPath_; }