2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2023-04-17 19:44:37 +08:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2019-02-27 18:39:32 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#include <cstdint>
|
2019-08-29 21:10:51 +08:00
|
|
|
#include <memory>
|
2017-12-21 07:45:38 +08:00
|
|
|
#include <string>
|
|
|
|
|
2019-08-29 21:10:51 +08:00
|
|
|
std::unique_ptr<char[]> loadDataFromFile(
|
2017-12-21 07:45:38 +08:00
|
|
|
const char *filename,
|
2019-08-29 21:10:51 +08:00
|
|
|
size_t &retSize);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
size_t writeDataToFile(
|
|
|
|
const char *filename,
|
|
|
|
const void *pData,
|
|
|
|
size_t dataSize);
|
|
|
|
|
|
|
|
bool fileExists(const std::string &fileName);
|
|
|
|
bool fileExistsHasSize(const std::string &fileName);
|
2023-04-17 19:44:37 +08:00
|
|
|
void dumpFileIncrement(const char *data, size_t dataSize, const std::string &filename, const std::string &extension);
|