summaryrefslogtreecommitdiff
path: root/lib/Input.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2001-11-26 23:11:40 +0000
committerPixel <Pixel>2001-11-26 23:11:40 +0000
commit3baa9d168c02a8734b95d1cc467601b6aaf2f6e4 (patch)
tree6c254e9d75dee5a1e305283788fea3d3fff2a445 /lib/Input.cc
parent3aa63fcbddbce8762ad0f3f54d90ad985c0f9c41 (diff)
Big job here. Many bugs out. Hurray!!
Diffstat (limited to 'lib/Input.cc')
-rw-r--r--lib/Input.cc16
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() {