Re: General C question - file attributes



>>
  RTFM "man stat", see there for "struct stat", field st_mode, macro
S_ISDIR(m).
<<
  Yeah,. I tried stat once but had portability problems...
  
>>
In the man page for readdir I found this:
              struct dirent {
<snip>            unsigned char   d_type;         /* type of file */
<<
  Yes d_type is exactly what I was looking for.  I had already looked up
the dirent structure in other documentation and it said the only field
was filename...  RTFM only works if the FM is good! <grin>
  
  Now I have to weigh dirent portability against stat portability, hmm. 
Well thanks for clearing it up for me...
  
  John  
  

___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: http://dl.www.juno.com/dynoget/tagj.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]