libPeConv
A library to load, manipulate, dump PE files.
file_util.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <windows.h>
9#include <iostream>
10
11#include "buffer_util.h"
12
13namespace peconv {
14
21 peconv::ALIGNED_BUF load_file(IN const char *filename, OUT size_t &r_size);
22
29 peconv::ALIGNED_BUF read_from_file(IN const char *path, IN OUT size_t &read_size);
30
38 bool dump_to_file(IN const char *path, IN PBYTE dump_data, IN size_t dump_size);
39
43 void free_file(IN peconv::ALIGNED_BUF buffer);
44
48 std::string get_file_name(IN const std::string full_path);
49
53 std::string get_directory_name(IN const std::string full_path);
54
55}; //namespace peconv
Definitions of the used buffer types. Functions for their allocation and deallocation.
PBYTE ALIGNED_BUF
Definition: buffer_util.h:41
void free_file(IN peconv::ALIGNED_BUF buffer)
Definition: file_util.cpp:127
std::string get_directory_name(IN const std::string full_path)
Definition: file_util.cpp:141
peconv::ALIGNED_BUF read_from_file(IN const char *path, IN OUT size_t &read_size)
Definition: file_util.cpp:65
peconv::ALIGNED_BUF load_file(IN const char *filename, OUT size_t &r_size)
Definition: file_util.cpp:11
bool dump_to_file(IN const char *path, IN PBYTE dump_data, IN size_t dump_size)
Definition: file_util.cpp:101
std::string get_file_name(IN const std::string full_path)
Definition: file_util.cpp:132