From 3baa9d168c02a8734b95d1cc467601b6aaf2f6e4 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 26 Nov 2001 23:11:40 +0000 Subject: Big job here. Many bugs out. Hurray!! --- lib/Input.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/Input.cc') diff --git a/lib/Input.cc b/lib/Input.cc index df0222a..a466468 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -18,6 +18,14 @@ Input::Input(String no) throw (GeneralException) : } cerr << "File " << no << " is opened with handle " << GetHandle() << endl; + size = lseek(GetHandle(), 0, SEEK_END); + lseek(GetHandle(), 0, SEEK_SET); + + struct stat s; + + fstat(GetHandle(), &s); + + date_modif = s.st_mtime; } bool Input::CanWrite() { @@ -32,6 +40,14 @@ String Input::GetName() { return n; } +off_t Input::GetSize() { + return size; +} + +time_t Input::GetModif() { + return date_modif; +} + Stdin_t::Stdin_t() : Handle(dup(0)) { } bool Stdin_t::CanWrite() { -- cgit v1.2.3