Here's the problem. I'm using the stat function to get the characteristics of a file on my system. The structure has a st_mode entry which is supposed to hold the permission parameters of the given file. But it is given in the form of an integer, and I need to put it in the form of a string (aka "frwx------"). My question is how can we find, from the st_mode entry, whether a file is readable by the user, writable by the user, etc...
Thanks for the help.