[fpc-pascal] findfirst and findnext on non accessible files
XHajT03 at mbox.vol.cz
Wed Jun 28 11:01:27 CEST 2006
Marc Santhoff wrote:
> trying to use FindFirst and FindNext on files I cannot detect the
> difference between a failed call because of no matching file and a
> failure when the file or dir is not listable by the user lacking
> If I'd use fpstat and friends myself this would mean doing anything
> doubly and having to write some code for each os in question.
> Is there any function or procedure that could help me here? Or should
> the implementation of FindFirst/Next be adapted to respect users
Which platform are you talking about, which FindFirst/FindNext
(Dos/SysUtils) and what is the behaviour expected from you? E.g. with:
FindFirst ('M:\IT\AuditPro', AnyFile, SR);
FindFirst ('M:\IT\AuditPro\.', AnyFile, SR);
FindFirst ('M:\IT\AuditPro\X', AnyFile, SR);
running under Win32, where I don't have access to "M:\IT\AuditPro"
directory, but I have access to "M:\IT" (i.e. I can see the AuditPro
directory itself), I get:
(where 5 corresponds to Access Denied).
Note that I don't know whether "M:\IT\AuditPro\X" exists or not (but that
is OK, IMHO).
More information about the fpc-pascal