Using access instead stat for checking the resource existance

2010-05-19 Thread Mladen Turk
Hi, We use stat all over the places for checking the presence of the file or directory. I propose we use access(path, R_OK [| W_OK]) instead, since the check is done with the real user id. Comments? Regards -- ^TM

Re: Using access instead stat for checking the resource existance

2010-05-19 Thread George Paul
+1 -George On 5/19/10 3:09 AM, Mladen Turk wrote: Hi, We use stat all over the places for checking the presence of the file or directory. I propose we use access(path, R_OK [| W_OK]) instead, since the check is done with the real user id. Comments? Regards