aboutsummaryrefslogtreecommitdiff
path: root/libfuzzer/FuzzerIO.h
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-04-05 17:14:41 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-05 17:14:41 +0000
commit20420b19577e0677b49adc48515cf492ecb76510 (patch)
treeb40cfd9e8802b2879a81663220a69c0d24691ebf /libfuzzer/FuzzerIO.h
parentaa95cac2104deb03bff16b617beddd7822903517 (diff)
parentd2f65654664d2c613523c7cfa351c0a821402b51 (diff)
downloadlibfuzzer-sys-20420b19577e0677b49adc48515cf492ecb76510.tar.gz
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/libfuzzer-sys/+/1662761 Change-Id: Id51e18804bd04a1d53ae6d055181e0cbce3bf7dd
Diffstat (limited to 'libfuzzer/FuzzerIO.h')
-rw-r--r--libfuzzer/FuzzerIO.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libfuzzer/FuzzerIO.h b/libfuzzer/FuzzerIO.h
index 6e4368b..abd2511 100644
--- a/libfuzzer/FuzzerIO.h
+++ b/libfuzzer/FuzzerIO.h
@@ -29,6 +29,9 @@ void WriteToFile(const uint8_t *Data, size_t Size, const std::string &Path);
void WriteToFile(const std::string &Data, const std::string &Path);
void WriteToFile(const Unit &U, const std::string &Path);
+void AppendToFile(const uint8_t *Data, size_t Size, const std::string &Path);
+void AppendToFile(const std::string &Data, const std::string &Path);
+
void ReadDirToVectorOfUnits(const char *Path, Vector<Unit> *V,
long *Epoch, size_t MaxSize, bool ExitOnError);
@@ -58,11 +61,13 @@ void RawPrint(const char *Str);
// Platform specific functions:
bool IsFile(const std::string &Path);
+bool IsDirectory(const std::string &Path);
size_t FileSize(const std::string &Path);
void ListFilesInDirRecursive(const std::string &Dir, long *Epoch,
Vector<std::string> *V, bool TopDir);
+bool MkDirRecursive(const std::string &Dir);
void RmDirRecursive(const std::string &Dir);
// Iterate files and dirs inside Dir, recursively.
@@ -82,6 +87,7 @@ struct SizedFile {
void GetSizedFilesFromDir(const std::string &Dir, Vector<SizedFile> *V);
char GetSeparator();
+bool IsSeparator(char C);
// Similar to the basename utility: returns the file name w/o the dir prefix.
std::string Basename(const std::string &Path);