[fpc-pascal] Re: FindFirst / FindNext with faHidden under Linux

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Jun 12 16:47:19 CEST 2007

Currently I am doing the following test to filter out the following
directories I consider hidden.

Hidden directories are:  .<name>  or '.'  or '..'

      if (s[1] in ['.']) or (s = '..') then
     [...process non-hidden directories here...]
  until FindNext(...);

Is there a better way of doing this?  This code need to run on
multiple platforms. I guess considering a .<name> directory hidden
under Windows is not ideas, but I can live with it.

Couldn't FindFirst() and FindNext() do the same test under unix type
OS's and then set the faHidden appropriately?

  - Graeme -

On 12/06/07, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> Hi,
> I'm doing a FindFirst / FindNext and fitering out all faHidden and
> faDirectory results.
> I don't want to show and dot (.<name>) directories as they are
> considered hidden under Linux.
> Yet FindFirst / FindNext doesn't have the faHidden flag set for those
> directories
> Is there another function or another way I can filter out any dot
> directories (.<name>) from the results?
> Regards,
>   - Graeme -

More information about the fpc-pascal mailing list