From c64700e7ae8f52bbf2c0e8a3673f587155719a07 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Sat, 2 Feb 2013 20:23:27 +0600 Subject: TextFile.hxx: use file system API --- src/TextFile.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/TextFile.hxx b/src/TextFile.hxx index c4822aaf8..d593e0961 100644 --- a/src/TextFile.hxx +++ b/src/TextFile.hxx @@ -22,11 +22,10 @@ #include "gcc.h" #include "fs/Path.hxx" +#include "fs/FileSystem.hxx" #include -#include - 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; -- cgit v1.2.3