mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 20:04:12 -03:00
186a661d1e
Credit goes to @myfreeer https://github.com/myfreeer/chrome-pak-customizer
26 lines
702 B
C
26 lines
702 B
C
#pragma once
|
|
#ifndef __PAK_FILE_IO_H__
|
|
#define __PAK_FILE_IO_H__
|
|
|
|
#include "pak_defs.h"
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
/**
|
|
* Read a file into memory, returns NULL_File on failure.
|
|
* Note: this would allocate memory.
|
|
* @param const char *fileName - target file name.
|
|
* @return PakFile - target file content.
|
|
*/
|
|
PakFile readFile(const char *fileName);
|
|
|
|
/**
|
|
* Write a file to storage, this would overwrite existing file.
|
|
* @param const char *fileName - target file name.
|
|
* @param PakFile file - target file content.
|
|
* @return bool - succeed or not.
|
|
*/
|
|
bool writeFile(const char *fileName, const PakFile file);
|
|
|
|
#endif // __PAK_FILE_IO_H__
|