libPeConv
A library to load, manipulate, dump PE files.
Loading...
Searching...
No Matches
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::UNALIGNED_BUF load_file(IN LPCTSTR filename, OUT size_t &r_size);
22
29 peconv::UNALIGNED_BUF read_from_file(IN LPCTSTR path, IN OUT size_t &read_size);
30
38 bool dump_to_file(IN LPCTSTR path, IN PBYTE dump_data, IN size_t dump_size);
39
43 void free_file(IN peconv::UNALIGNED_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
58 size_t find_extension_pos(IN const std::string str);
59
60}; //namespace peconv
Definitions of the used buffer types. Functions for their allocation and deallocation.
bool dump_to_file(IN LPCTSTR path, IN PBYTE dump_data, IN size_t dump_size)
peconv::UNALIGNED_BUF load_file(IN LPCTSTR filename, OUT size_t &r_size)
Definition file_util.cpp:11
std::string get_directory_name(IN const std::string full_path)
void free_file(IN peconv::UNALIGNED_BUF buffer)
peconv::UNALIGNED_BUF read_from_file(IN LPCTSTR path, IN OUT size_t &read_size)
Definition file_util.cpp:65
PBYTE UNALIGNED_BUF
Definition buffer_util.h:41
size_t find_extension_pos(IN const std::string str)
std::string get_file_name(IN const std::string full_path)