Check if a File/DirEntry is Readable

"Nordlöw" per.nordlow at gmail.com
Sun Sep 22 10:46:50 PDT 2013


I'm missing a function in std.file that checks if the 
attributes() member of DirEntry means that the it is readable by 
a specific user id (defaulted to the current user). Has anybody 
written such a logic? I know that such a function is not 
difficult to write (based on the contents of attributes()). But 
why isn't such a very often used function in the standard library?

Note that I've been given the advice in a previous D-post not to 
rely on file exceptions for checking for file/directory 
readability.


More information about the Digitalmars-d mailing list