TextFile.hxx: use file system API
This commit is contained in:
parent
5bd1917705
commit
c64700e7ae
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user