TextFile.hxx: use file system API

This commit is contained in:
Denis Krjuchkov 2013-02-02 20:23:27 +06:00
parent 5bd1917705
commit c64700e7ae

View File

@ -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;