[fpc-pascal] findfirst and findnext on non accessible files

Marc Santhoff M.Santhoff at t-online.de
Wed Jun 28 18:35:19 CEST 2006


Am Mittwoch, den 28.06.2006, 18:13 +0200 schrieb Tomas Hajny:
> Marc Santhoff wrote:
> > Am Mittwoch, den 28.06.2006, 11:01 +0200 schrieb Tomas Hajny:
> >
> >> Which platform are you talking about, which FindFirst/FindNext
> >> (Dos/SysUtils) and what is the behaviour expected from you? E.g. with:
> >
> > Sorry, I was too deep into the problem.
> >
> > I'm using FreeBSD as main platform for development but for the future at
> > least Windows and Linux are targets.
> 
> Still, which FindFirst are you talking about - that one from unit Dos, or
> that one from unit SysUtils?


I'm talking about sysutils since using unit dos on unix makes little
sense imho.

>  .
>  .
> > That's a result I'd expect. So I'll go digging for some "Error" or
> > "UnixError" variable.
> 
> No, you don't need any "UnixError". Dos.FindFirst returns errors in
> DosError for all platforms (it's a compatibility unit after all).
> SysUtils.FindFirst should return the error in its return value directly. I
> don't know whether the implementation for FreeBSD does it correctly at the
> moment, but that's how it's supposed to work, at least (=> enter it in the
> bug tracker if it doesn't do work like that).

I see, thanks for pointing me there. There *is* a DOS unit on unix, I
don't believe it... =:-)

I'll try that first before hacking up the sysutils one.

Thank you!
Marc





More information about the fpc-pascal mailing list