|
Ninja
|
Implementation of DiskInterface that actually hits the disk. More...
#include <disk_interface.h>

Public Member Functions | |
| void | AllowStatCache (bool allow) |
| Whether stat information can be cached. Only has an effect on Windows. More... | |
| virtual bool | MakeDir (const string &path) |
| Create a directory, returning false on failure. More... | |
| bool | MakeDirs (const string &path) |
Create all the parent directories for path; like mkdir -p basename path. More... | |
| virtual string | ReadFile (const string &path, string *err) |
| Read a file to a string. Fill in |err| on error. More... | |
| RealDiskInterface () | |
| virtual int | RemoveFile (const string &path) |
| Remove the file named path. More... | |
| virtual TimeStamp | Stat (const string &path) const |
| stat() a file, returning the mtime, or 0 if missing and -1 on other errors. More... | |
| virtual bool | WriteFile (const string &path, const string &contents) |
| Create a file, with the specified name and contents Returns true on success, false on failure. More... | |
| virtual | ~RealDiskInterface () |
Public Attributes | |
| bool | quiet_ |
| Whether to print on errors. Used to make a test quieter. More... | |
Implementation of DiskInterface that actually hits the disk.
Definition at line 58 of file disk_interface.h.
|
inline |
Definition at line 59 of file disk_interface.h.
|
inlinevirtual |
Definition at line 64 of file disk_interface.h.
| void RealDiskInterface::AllowStatCache | ( | bool | allow | ) |
Whether stat information can be cached. Only has an effect on Windows.
Definition at line 256 of file disk_interface.cc.
|
virtual |
Create a directory, returning false on failure.
Implements DiskInterface.
Definition at line 221 of file disk_interface.cc.
References Error().
|
inherited |
Create all the parent directories for path; like mkdir -p basename path.
Definition at line 134 of file disk_interface.cc.
Referenced by Builder::StartEdge().
|
virtual |
Read a file to a string. Fill in |err| on error.
Implements DiskInterface.
Definition at line 232 of file disk_interface.cc.
References ReadFile().
|
virtual |
Remove the file named path.
It behaves like 'rm -f path' so no errors are reported if it does not exists.
Implements DiskInterface.
Definition at line 242 of file disk_interface.cc.
References Error().
|
virtual |
stat() a file, returning the mtime, or 0 if missing and -1 on other errors.
Implements DiskInterface.
Definition at line 153 of file disk_interface.cc.
References Error().
Referenced by WriteFakeManifests().
|
virtual |
Create a file, with the specified name and contents Returns true on success, false on failure.
Implements DiskInterface.
Definition at line 197 of file disk_interface.cc.
References Error().
| bool RealDiskInterface::quiet_ |
Whether to print on errors. Used to make a test quieter.
Definition at line 72 of file disk_interface.h.
1.8.9.1