[pacman-dev] [PATCH] Use access() instead of stat() when possible

Xavier shiningxc at gmail.com
Mon Jun 16 01:59:29 EDT 2008


Dan McGee wrote:
> We were using the stat() system call in quite a few places when we didn't
> actually need anything the stat struct returned- we were simply checking for
> file existence. access() will be more efficient in those cases.
>

I didn't know access, it is very nice. We can check the permissions in 
the same time, we don't have an unused stat struct, and the name clearly 
indicates what we do. Cool :)




More information about the pacman-dev mailing list