summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-05-24 16:47:24 (GMT)
committerEvan Martin <martine@danga.com>2011-05-24 16:47:24 (GMT)
commit9227b6d0ddd8ae0171aa466ceda797a948441740 (patch)
treef8c6049ed9ab350fb83dda6249aca84e07e5e381 /src/util.h
parentb1c1bae3e0da4cd8fdd2b34a8619b233624d8513 (diff)
downloadNinja-9227b6d0ddd8ae0171aa466ceda797a948441740.zip
Ninja-9227b6d0ddd8ae0171aa466ceda797a948441740.tar.gz
Ninja-9227b6d0ddd8ae0171aa466ceda797a948441740.tar.bz2
move ReadFile into util
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 49a9aec..8d42ed4 100644
--- a/src/util.h
+++ b/src/util.h
@@ -35,4 +35,8 @@ bool CanonicalizePath(string* path, string* err);
/// Portability abstraction.
int MakeDir(const string& path);
+/// Read a file to a string.
+/// Returns -errno and fills in \a err on error.
+int ReadFile(const string& path, string* contents, string* err);
+
#endif // NINJA_UTIL_H_