Refactored read methods

This commit is contained in:
Linus Dierheimer
2022-06-20 16:27:33 +02:00
parent 6e731c80d0
commit 8fa09ca093
12 changed files with 53 additions and 39 deletions
+4 -4
View File
@@ -413,14 +413,14 @@ void ffListFeatures();
void ffStartDetectionThreads(FFinstance* instance);
//common/io.c
bool ffWriteFDData(int fd, size_t dataSize, const void* data);
bool ffWriteFDBuffer(int fd, const FFstrbuf* content);
bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data);
bool ffWriteFileBuffer(const char* fileName, const FFstrbuf* buffer);
void ffAppendFDContent(int fd, FFstrbuf* buffer);
bool ffAppendFileContent(const char* fileName, FFstrbuf* buffer); //returns true if open() succeeds. This is used to differentiate between <file not found> and <empty file>
bool ffGetFileContent(const char* fileName, FFstrbuf* buffer);
bool ffAppendFDBuffer(int fd, FFstrbuf* buffer);
ssize_t ffGetFileData(const char* fileName, size_t dataSize, void* data);
bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer);
bool ffGetFileBuffer(const char* fileName, FFstrbuf* buffer);
bool ffFileExists(const char* fileName, mode_t mode);
void ffSuppressIO(bool suppress); // Not thread safe!