Commit c64700e7 authored by Denis Krjuchkov's avatar Denis Krjuchkov

TextFile.hxx: use file system API

parent 5bd19177
......@@ -22,11 +22,10 @@
#include "gcc.h"
#include "fs/Path.hxx"
#include "fs/FileSystem.hxx"
#include <glib.h>
#include <stdio.h>
class TextFile {
static constexpr size_t max_length = 512 * 1024;
static constexpr size_t step = 1024;
......@@ -37,7 +36,7 @@ class TextFile {
public:
TextFile(const Path &path_fs)
:file(fopen(path_fs.c_str(), "r")),
:file(FOpen(path_fs, FOpenMode::ReadText)),
buffer(g_string_sized_new(step)) {}
TextFile(const TextFile &other) = delete;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment