changed project structure

Also made functions return result to know how the read went
Also made the file derserializer work more efficiently
This commit is contained in:
Luna 2025-07-01 23:41:32 +02:00
parent d161e31e63
commit ceb65deca8
7 changed files with 75 additions and 31 deletions

18
examples/test.cpp Normal file
View file

@ -0,0 +1,18 @@
#include "../src/file_read.h"
#include <fcntl.h>
#include <unistd.h>
#include <print>
int main()
{
file_reader a("test.txt");
buffer t;
t.data = nullptr;
t.allocated = 0;
t.size = 10;
auto tup = std::make_tuple(t);
auto res = a.read_from_tuple(tup);
if (res.second == READ_CORRECT)
std::println("{}", std::get<0>(tup).data);
}

1
examples/test.txt Normal file
View file

@ -0,0 +1 @@
18267127861827192871jasbajs