View Full Version : accessing file data (ex. permissions, size) in C?

October 27th, 2007, 11:57 PM
I've never really accessed this layer of information when programming, but I have this idea I just would like to get out of me and I'd need to be able to read different file data such as date modified, date accessed, permissions, owner, group, etc.

Right now I have a program that can open a directory and read off all of the file names.

I know how to open a file and read its contents. However, I don't know how to access these other fields.

I am not recreating ls, and its source is pretty inconsistent, particularly in terms of indentation style, and therefore hard to grasp..

October 28th, 2007, 12:00 AM
read up on open and stat :)