diff options
Diffstat (limited to 'lib/Input.cc')
-rw-r--r-- | lib/Input.cc | 16 |
1 files changed, 16 insertions, 0 deletions
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() { |