diff options
author | unknown <petr@meloun.(none)> | 2012-02-09 21:23:35 (GMT) |
---|---|---|
committer | unknown <petr@meloun.(none)> | 2012-02-09 21:23:35 (GMT) |
commit | af070e520806987bd3b175bf222774de923b62dd (patch) | |
tree | 0eff2859034dd46b6cbd8bd93fed41b8824e642e /src/disk_interface.h | |
parent | 7504ab4e5dbb153979333c67a8a43448040b718d (diff) | |
download | Ninja-af070e520806987bd3b175bf222774de923b62dd.zip Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.gz Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.bz2 |
Response files
Diffstat (limited to 'src/disk_interface.h')
-rw-r--r-- | src/disk_interface.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/disk_interface.h b/src/disk_interface.h index b0fed3d..04e64ec 100644 --- a/src/disk_interface.h +++ b/src/disk_interface.h @@ -34,6 +34,10 @@ struct DiskInterface { /// Create a directory, returning false on failure. virtual bool MakeDir(const string& path) = 0; + /// Create a file, with the specified name and contens + /// Returns true on success, false on failure + virtual bool WriteFile(const string & path, const string & contetns) = 0; + /// Read a file to a string. Fill in |err| on error. virtual string ReadFile(const string& path, string* err) = 0; @@ -54,6 +58,7 @@ struct RealDiskInterface : public DiskInterface { virtual ~RealDiskInterface() {} virtual TimeStamp Stat(const string& path); virtual bool MakeDir(const string& path); + virtual bool WriteFile(const string & path, const string & contens); virtual string ReadFile(const string& path, string* err); virtual int RemoveFile(const string& path); }; |