[fpc-pascal] Searching for files all over the disk
juergen.hestermann at gmx.de
Tue Aug 21 10:59:41 CEST 2012
Am 2012-08-21 00:00, schrieb Bart:
> My Delphi projects are located like this:
> As Juha has pointed out, this is a general way projects are organized.
Realy? How do you know? That's just an assumption.
But my complain was more general about an increasing use of branch scanning (not only in the Delphi converter).
It has become common practice to ransack each and every directory on disk in many programs based
on more or less justified assumptions.
It already starts with the Windows explorer which opens all zip files in a directory to present
them as directories. If you only come along this directory while navigating to a
deeper level you get a long delay.
The same happens when programs look in all directories of the path environment.
This has annoyed me since decades because each and every program adds directories to this variable
and all these programs then search *all* these paths in case something is not found.
This is not only time consuming but it also happens that *some* version
of a needed file is found and used but this may be the wrong one (i.e. config files).
Why not ask the user where to find a file (or many files) if they are not found where expected?
I think it is not a good idea to scan through branches that no user has said to scan.
If a file is found (and used) that was just a copy in some subdirectory with wrong data in it
then the results can be wrong but the user does not know the reason because he does not know
which files were used. If the user has to specify a (starting) directory he knows that
1.) a scan is done
2.) what is scanned
More information about the fpc-pascal