Browse Source

Add overload for File::ReadText which returns string

Josh Engebretson 9 years ago
parent
commit
51319e6cd0
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
     /// Reads a text file, ensuring data from file is 0 terminated
     virtual void ReadText(String& text);
     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
     /// Return the fullpath to the file
     const String& GetFullPath() const { return fullPath_; }
     const String& GetFullPath() const { return fullPath_; }