On Tue, Jan 09, 2007 at 10:00:03AM +0000, Peter Bortas @ Pike developers forum wrote:
File does not exist is pretty permanent.
no, if the file does not exist, the next line of the code could create it, if it's needed or just go on without it.
if the file does exist and there is no read permission than that is not the same as a file not existing and should be treated differently. fixing it most likely requires user intervention too.
a program that treats non-existing and unreadable files the same is broken. therefore i like this difference of throwing en error on permisson problems because then i can get away with if(read_file()) in simple programs where i don't mind the crash.
I can't think of any offhand where it matters if the file is unreadable or if there is insufficient permissions.
unreadable or insufficient permissions are the same kind of problem, but non-existing is a different kind of problem.
non-existing in most cases is non-critical, whereas unreadable or insufficient permission may be critical.
greetings, martin.