replace TextFile references with LineReader

This commit is contained in:
Max Kellermann
2021-12-03 14:16:32 +01:00
parent f9c4d88b12
commit 8681a3d74c
14 changed files with 33 additions and 31 deletions

View File

@@ -24,7 +24,7 @@
#include "StorageState.hxx"
#include "lib/fmt/ExceptionFormatter.hxx"
#include "fs/io/TextFile.hxx"
#include "fs/io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx"
#include "storage/Registry.hxx"
#include "storage/CompositeStorage.hxx"
@@ -73,7 +73,7 @@ storage_state_save(BufferedOutputStream &os, const Instance &instance)
}
bool
storage_state_restore(const char *line, TextFile &file, Instance &instance)
storage_state_restore(const char *line, LineReader &file, Instance &instance)
{
if (!StringStartsWith(line, MOUNT_STATE_BEGIN))
return false;

View File

@@ -27,13 +27,14 @@
struct Instance;
class BufferedOutputStream;
class TextFile;
class LineReader;
void
storage_state_save(BufferedOutputStream &os, const Instance &instance);
bool
storage_state_restore(const char *line, TextFile &file, Instance &instance);
storage_state_restore(const char *line, LineReader &file,
Instance &instance);
/**
* Generates a hash number for the current state of the composite storage.