find file size and file type

I am Using the POSIX library "dirent.h" to search a folder for files.

Question 1: is there an easy way to get the size of the file? I know i could theoretically use the fopen-fseek-ftell method but that seems kind of tedious and i was wondering if there was an easier way.

Question 2: I want to use the dirent->d_type to find out the type of files, but i dont know how to interpret the meanings of its values. where can i find this?
Last edited on
Topic archived. No new replies allowed.