Path: new class "Path" wraps filesystem path strings

This commit is contained in:
Max Kellermann
2013-01-17 00:56:57 +01:00
parent 8901514506
commit e5039c478a
21 changed files with 380 additions and 238 deletions

View File

@@ -21,6 +21,7 @@
#define MPD_TEXT_FILE_HXX
#include "gcc.h"
#include "Path.hxx"
#include <glib.h>
@@ -35,8 +36,9 @@ class TextFile {
GString *const buffer;
public:
TextFile(const char *path_fs)
:file(fopen(path_fs, "r")), buffer(g_string_sized_new(step)) {}
TextFile(const Path &path_fs)
:file(fopen(path_fs.c_str(), "r")),
buffer(g_string_sized_new(step)) {}
TextFile(const TextFile &other) = delete;