I know I can use chflags(2) to change the flags on a file. How do I find out what they are in the first place? I must be staring at the answer in the documentation but not seeing it. I know my C program can do an
ls -lo on the file and then parse the returned string, but I don't want to fire up a subprocess for each file I'm examining.