#include #include #include #include #include #include #include #include "Input.h" #include "Exceptions.h" #include "config.h" Input::Input(String no) throw (IOGeneral) : Handle(no.strlen() ? open(no.to_charp(), O_RDONLY) : 0), n(no) { if (GetHandle() < 0) { throw IOGeneral(String("Error opening file") + no + " for reading: " + strerror(errno)); } } bool Input::CanWrite() { return 0; } bool Input::CanRead() { return 1; } String Input::GetName() { return n; }