Marco van de Voort wrote:
>> Marco van de Voort wrote:
>> >
>> > (that is not really the problem, OS errorcodes can be hauled with
>> > getlastoserror, which is errno on *nix)
>>
>> Well, it is a problem, because not returning the error code directly in
>> return value violates SysUtils.FindFirst specification and most probably
>> Delphi compatibility too.
 .
 .
> But in general findfirst should be ok, otoh it should mostly just report
> success or fail, and not specify too much about the reasons, since that
> would make findfirst possibily OS specific.

Well, I'm still of different opinion. The basic set of error codes should
be shared on FindFirst level (BTW as opposed to GetLastError, which
clearly returns last OS error and thus is not portable). I consider at
least the following to belong to this basic set (in this particular case):

- No more files (18)
- Path not found (3)
- Access denied (5)

I might have forgotten other important ones (writing this from the top of
my head on the way from Frankfurt to Bonn).

Tomas

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to