PIBinaryLog createIndexOnFly, loadIndex, saveIndex features

PIFile readAll and writeAll static methods
This commit is contained in:
2023-05-11 21:44:31 +03:00
parent 96e8ef2b23
commit 1de4304e30
5 changed files with 228 additions and 69 deletions

View File

@@ -293,6 +293,14 @@ public:
//! \~russian Применяет параметры "info" к файлу или директории с путём "info".path
static bool applyFileInfo(const FileInfo & info) { return applyFileInfo(info.path, info); }
//! \~english Read all file content at path "path" to byte array and return it.
//! \~russian Читает всё содержимое файла по пути "path" и возвращает его как массив байтов.
static PIByteArray readAll(const PIString & path, bool forceRead = false);
//! \~english Clear file at path "path" and write "data", returns written bytes.
//! \~russian Очищает файл по пути "path", пишет туда "data" и возвращает количество записанных байт.
static int writeAll(const PIString & path, const PIByteArray & data);
//! \handlers
//! \{