summaryrefslogtreecommitdiffstats
path: root/src/ninja.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninja.h')
-rw-r--r--src/ninja.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ninja.h b/src/ninja.h
index 0f4a029..8927768 100644
--- a/src/ninja.h
+++ b/src/ninja.h
@@ -51,8 +51,10 @@ struct DiskInterface {
virtual string ReadFile(const string& path, string* err) = 0;
/// Remove the file named @a path. It behaves like 'rm -f path' so no errors
/// are reported if it does not exists.
- /// @returns whether the file has been removed.
- virtual bool RemoveFile(const string& path) = 0;
+ /// @returns 0 if the file has been removed,
+ /// 1 if the file does not exists, and
+ /// -1 if an error occurs.
+ virtual int RemoveFile(const string& path) = 0;
/// Create all the parent directories for path; like mkdir -p
/// `basename path`.
@@ -65,7 +67,7 @@ struct RealDiskInterface : public DiskInterface {
virtual int Stat(const string& path);
virtual bool MakeDir(const string& path);
virtual string ReadFile(const string& path, string* err);
- virtual bool RemoveFile(const string& path);
+ virtual int RemoveFile(const string& path);
};
/// Mapping of path -> FileStat.