POV-Ray : Newsgroups : povray.programming : file size with file_pov : file size with file_pov Server Time
8 Jul 2024 19:14:03 EDT (-0400)
  file size with file_pov  
From: ABX
Date: 21 Jan 2003 02:40:52
Message: <iktp2vgbengh0evamff3k6fvugrbt3l3kr@4ax.com>
I noticed there is no method to get size of file using io classes from
file_pov.cpp. I wonder it is not implemented becouse there was no need for it
yet or becouse it can't work or becouse there are better ways to do it ?
Waiting for answer I have adjusted it for my purposes this way:

file_pov.h
  class pov_io_base
  {
    public:
      ......
      long fsize(void);
      ......
  }

file_pov.cpp
  ......
  #include <io.h>
  ......
  long pov_io_base::fsize (void)
  {
    return (filelength(fileno(f))) ;
  }


Is it a correct way according to intentions of io classes ?

ABX


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.