Bug fix
[IRC.git] / Robust / src / Runtime / file.c
index a295465f19c45a577f6d821e16cf830341bee37c..bee9b96fe280eb8b89772e4a9d141bbb9e0ba257 100644 (file)
@@ -46,3 +46,11 @@ int ___FileInputStream______nativeRead____I__AR_B_I(int fd, struct ArrayObject *
   status=read(fd, string, toread);
   return status;
 }
+
+long long ___File______nativeLength_____AR_B(struct ArrayObject * ao) {
+  int length=ao->___length___;
+  char* filename= (((char *)& ao->___length___)+sizeof(int));
+  struct stat st;
+  stat(filename, &st);
+  return st.st_size;
+}