ladybird/LibGUI/GFile.h
Andreas Kling 8e3d0a23d5 LibGUI: Add GTCPSocket and base class GSocket (inherits from GIODevice.)
And use these to do the line-by-line reading automagically instead of having
that logic in IRCClient. This will definitely come in handy.
2019-03-18 14:09:58 +01:00

21 lines
487 B
C++

#pragma once
#include <LibGUI/GIODevice.h>
#include <AK/AKString.h>
class GFile final : public GIODevice {
public:
GFile() { }
explicit GFile(const String&);
virtual ~GFile() override;
String filename() const { return m_filename; }
void set_filename(const String& filename) { m_filename = filename; }
virtual bool open(GIODevice::OpenMode) override;
virtual const char* class_name() const override { return "GFile"; }
private:
String m_filename;
};