John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 1 | #ifndef AOS_UTIL_FILE_H_ |
| 2 | #define AOS_UTIL_FILE_H_ |
Brian Silverman | 61175fb | 2016-03-13 15:35:56 -0400 | [diff] [blame] | 3 | |
| 4 | #include <string> |
| 5 | |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 6 | #include "absl/strings/string_view.h" |
| 7 | |
Brian Silverman | 61175fb | 2016-03-13 15:35:56 -0400 | [diff] [blame] | 8 | namespace aos { |
| 9 | namespace util { |
| 10 | |
| 11 | // Returns the complete contents of filename. LOG(FATAL)s if any errors are |
| 12 | // encountered. |
Austin Schuh | cb10841 | 2019-10-13 16:09:54 -0700 | [diff] [blame] | 13 | ::std::string ReadFileToStringOrDie(const absl::string_view filename); |
Brian Silverman | 61175fb | 2016-03-13 15:35:56 -0400 | [diff] [blame] | 14 | |
| 15 | } // namespace util |
| 16 | } // namespace aos |
| 17 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 18 | #endif // AOS_UTIL_FILE_H_ |