Lines Matching refs:Path
34 long GetEpoch(const std::string &Path) { in GetEpoch() argument
36 if (stat(Path.c_str(), &St)) in GetEpoch()
41 Unit FileToVector(const std::string &Path, size_t MaxSize, bool ExitOnError) { in FileToVector() argument
42 std::ifstream T(Path, std::ios::binary); in FileToVector()
44 Printf("No such directory: %s; exiting\n", Path.c_str()); in FileToVector()
61 std::string FileToString(const std::string &Path) { in FileToString() argument
62 std::ifstream T(Path, std::ios::binary); in FileToString()
67 void CopyFileToErr(const std::string &Path) { in CopyFileToErr() argument
68 Puts(FileToString(Path).c_str()); in CopyFileToErr()
71 void WriteToFile(const Unit &U, const std::string &Path) { in WriteToFile() argument
72 WriteToFile(U.data(), U.size(), Path); in WriteToFile()
75 void WriteToFile(const std::string &Data, const std::string &Path) { in WriteToFile() argument
77 Path); in WriteToFile()
80 void WriteToFile(const uint8_t *Data, size_t Size, const std::string &Path) { in WriteToFile() argument
82 FILE *Out = fopen(Path.c_str(), "wb"); in WriteToFile()
88 void AppendToFile(const std::string &Data, const std::string &Path) { in AppendToFile() argument
90 Path); in AppendToFile()
93 void AppendToFile(const uint8_t *Data, size_t Size, const std::string &Path) { in AppendToFile() argument
94 FILE *Out = fopen(Path.c_str(), "a"); in AppendToFile()
101 void ReadDirToVectorOfUnits(const char *Path, std::vector<Unit> *V, long *Epoch, in ReadDirToVectorOfUnits() argument
106 ListFilesInDirRecursive(Path, Epoch, &Files, /*TopDir*/true); in ReadDirToVectorOfUnits()
113 Printf("Loaded %zd/%zd files from %s\n", NumLoaded, Files.size(), Path); in ReadDirToVectorOfUnits()
210 Dir, [](const std::string &Path) {}, in RmDirRecursive() argument
211 [](const std::string &Path) { RmDir(Path); }, in RmDirRecursive() argument
212 [](const std::string &Path) { RemoveFile(Path); }); in RmDirRecursive() argument