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

Public Types | |
| enum | Status { Okay, NotFound, OtherError } |
| Result of ReadFile. More... | |
Public Member Functions | |
| void | AllowStatCache (bool allow) |
| Whether stat information can be cached. Only has an effect on Windows. More... | |
| virtual bool | MakeDir (const std::string &path) |
| Create a directory, returning false on failure. More... | |
| bool | MakeDirs (const std::string &path) |
Create all the parent directories for path; like mkdir -p basename path. More... | |
| virtual Status | ReadFile (const std::string &path, std::string *contents, std::string *err) |
| Read and store in given string. More... | |
| RealDiskInterface () | |
| virtual int | RemoveFile (const std::string &path) |
| Remove the file named path. More... | |
| virtual TimeStamp | Stat (const std::string &path, std::string *err) const |
| stat() a file, returning the mtime, or 0 if missing and -1 on other errors. More... | |
| virtual bool | WriteFile (const std::string &path, const std::string &contents) |
| Create a file, with the specified name and contents Returns true on success, false on failure. More... | |
| virtual | ~RealDiskInterface () |
Implementation of DiskInterface that actually hits the disk.
Definition at line 71 of file disk_interface.h.
|
inherited |
Result of ReadFile.
| Enumerator | |
|---|---|
| Okay | |
| NotFound | |
| OtherError | |
Definition at line 29 of file disk_interface.h.
|
inline |
Definition at line 72 of file disk_interface.h.
|
inlinevirtual |
Definition at line 77 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 281 of file disk_interface.cc.
|
virtual |
Create a directory, returning false on failure.
Implements DiskInterface.
Definition at line 246 of file disk_interface.cc.
References Error().
|
inherited |
Create all the parent directories for path; like mkdir -p basename path.
Definition at line 138 of file disk_interface.cc.
References Error().
Referenced by Builder::StartEdge().
|
virtual |
Read and store in given string.
On success, return Okay. On error, return another Status and fill |err|.
Implements FileReader.
Definition at line 257 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 267 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 160 of file disk_interface.cc.
References METRIC_RECORD.
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 222 of file disk_interface.cc.
References Error().
1.8.14