Lines Matching refs:Path
26 long GetEpoch(const std::string &Path) { in GetEpoch() argument
28 if (stat(Path.c_str(), &St)) in GetEpoch()
33 Unit FileToVector(const std::string &Path, size_t MaxSize, bool ExitOnError) { in FileToVector() argument
34 std::ifstream T(Path, std::ios::binary); in FileToVector()
36 Printf("No such directory: %s; exiting\n", Path.c_str()); in FileToVector()
53 std::string FileToString(const std::string &Path) { in FileToString() argument
54 std::ifstream T(Path, std::ios::binary); in FileToString()
59 void CopyFileToErr(const std::string &Path) { in CopyFileToErr() argument
60 Printf("%s", FileToString(Path).c_str()); in CopyFileToErr()
63 void WriteToFile(const Unit &U, const std::string &Path) { in WriteToFile() argument
64 WriteToFile(U.data(), U.size(), Path); in WriteToFile()
67 void WriteToFile(const std::string &Data, const std::string &Path) { in WriteToFile() argument
69 Path); in WriteToFile()
72 void WriteToFile(const uint8_t *Data, size_t Size, const std::string &Path) { in WriteToFile() argument
74 FILE *Out = fopen(Path.c_str(), "wb"); in WriteToFile()
80 void AppendToFile(const std::string &Data, const std::string &Path) { in AppendToFile() argument
82 Path); in AppendToFile()
85 void AppendToFile(const uint8_t *Data, size_t Size, const std::string &Path) { in AppendToFile() argument
86 FILE *Out = fopen(Path.c_str(), "a"); in AppendToFile()
93 void ReadDirToVectorOfUnits(const char *Path, Vector<Unit> *V, long *Epoch, in ReadDirToVectorOfUnits() argument
98 ListFilesInDirRecursive(Path, Epoch, &Files, /*TopDir*/true); in ReadDirToVectorOfUnits()
105 Printf("Loaded %zd/%zd files from %s\n", NumLoaded, Files.size(), Path); in ReadDirToVectorOfUnits()
197 Dir, [](const std::string &Path) {}, in RmDirRecursive() argument
198 [](const std::string &Path) { RmDir(Path); }, in RmDirRecursive() argument
199 [](const std::string &Path) { RemoveFile(Path); }); in RmDirRecursive() argument