Index: tools/gn/filesystem_utils.h |
diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h |
index f64c00d751918238d685d49ef0701beab88bf62e..a4137658ef1cd740a458e95516eddd2a7591498b 100644 |
--- a/tools/gn/filesystem_utils.h |
+++ b/tools/gn/filesystem_utils.h |
@@ -163,6 +163,16 @@ SourceDir SourceDirForCurrentDirectory(const base::FilePath& source_root); |
// go in the root build directory. Otherwise, the result will end in a slash. |
std::string GetOutputSubdirName(const Label& toolchain_label, bool is_default); |
+// Returns true if the contents of the file and stream given are equal, false |
+// otherwise. |
+bool ContentsEqual(const base::FilePath& file_path, std::stringstream* data); |
+ |
+// Writes given stream contents to the given file if it differs from existing |
+// file contents. Returns true if new contents was successfully written or |
+// existing file contents doesn't need updating, false on write error. |
+bool WriteFileIfChanged(const base::FilePath& file_path, |
+ std::stringstream* data); |
+ |
// ----------------------------------------------------------------------------- |
// These functions return the various flavors of output and gen directories. |