12 #ifndef LLVM_FUZZER_IO_H
13 #define LLVM_FUZZER_IO_H
19 long GetEpoch(
const std::string &Path);
22 bool ExitOnError =
true);
31 long *Epoch,
size_t MaxSize,
bool ExitOnError);
35 const std::string &FileName);
38 std::string
DirName(
const std::string &FileName);
49 void Printf(
const char *Fmt, ...);
55 bool IsFile(
const std::string &Path);
58 std::vector<std::string> *V,
bool TopDir);
76 #endif // LLVM_FUZZER_IO_H
int DuplicateFile(int Fd)
void ListFilesInDirRecursive(const std::string &Dir, long *Epoch, std::vector< std::string > *V, bool TopDir)
bool IsFile(const std::string &Path)
std::string FileToString(const std::string &Path)
void ReadDirToVectorOfUnits(const char *Path, std::vector< Unit > *V, long *Epoch, size_t MaxSize, bool ExitOnError)
long GetEpoch(const std::string &Path)
FILE * OpenFile(int Fd, const char *Mode)
std::string DirPlusFile(const std::string &DirPath, const std::string &FileName)
intptr_t GetHandleFromFd(int fd)
void CopyFileToErr(const std::string &Path)
void WriteToFile(const Unit &U, const std::string &Path)
Unit FileToVector(const std::string &Path, size_t MaxSize, bool ExitOnError)
void RemoveFile(const std::string &Path)
void DiscardOutput(int Fd)
std::vector< uint8_t > Unit
std::string DirName(const std::string &FileName)
Printf(" # Score: %d, Used: %d\n", Scores[i], Usages[i])
bool IsInterestingCoverageFile(const std::string &FileName)
void RawPrint(const char *Str)