Recent

Author Topic: [SOLVED] FindAllFiles - should it detect hidden files?  (Read 14800 times)

Gizmo

  • Hero Member
  • *****
  • Posts: 831
Re: [SOLVED] FindAllFiles - should it detect hidden files?
« Reply #15 on: December 13, 2014, 09:02:50 pm »
Gents

I got this working well with my Linux platform, but there is a snag with the Windows version.

AFAIK, on Windows, FindAllFiles (and FindAllFilesEx) will find hidden files, but NOT if they are in a hidden directory. Whereas on Linux, because "everything is a file", it works as hoped. But on Windows, only hidden files in unhidden directories are found.

So I need a cross-platfrom way of making FindAllFilesEx find all files, hidden or not, in all directories, hidden or not, for both Windows and Linux.

I realise the default and sensible answer would be "just use TFileSearcher and pass faDirectory or faHidden but that would involve an intensive re-write of the core of my program I think, unless you can see otherwise.

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: [SOLVED] FindAllFiles - should it detect hidden files?
« Reply #16 on: December 13, 2014, 09:31:36 pm »
I just tested FindAllFilesEx and it is working on my Windows. Check the attached image.

Gizmo

  • Hero Member
  • *****
  • Posts: 831
Re: [SOLVED] FindAllFiles - should it detect hidden files?
« Reply #17 on: December 13, 2014, 10:21:56 pm »
You are totally correct - my mistake. It was another part of my code. Still SOLVED :-)

 

TinyPortal © 2005-2018