| iMatix home page | << | < | > | >> |
![]() Version 1.91 |
#include "sflfile.h" long get_file_size ( const char *filename)
Returns the size, in bytes, of the specified file or directory. The size of a directory is not a portable concept. If there is an error, returns -1.
{ struct stat stat_buf; ASSERT (filename); if (stat ((char *) filename, &stat_buf) == 0) return ((long) stat_buf.st_size); else return (-1); }
| << | < | > | >> |
![]() |