I came across a bit of relevance code in a fixlet that had:
exists “C:\Program”
What it was trying to do was find a file or folder with the name C:\Program that had been accidentally created. It seems some applications don’t like it when such a file (or folder) exists…
The relevance seemed to be returning true, even on Non-Windows systems …
exists file “C:\Program”
and
exists folder "C:\Program"
Seem to be "much more discriminating…
Not exactly more efficient and not really even more readable. It has the advantage of only defining the string once and using it twice, which makes it easier to change or modify or add to:
exists (files it; folders it) of ("C:\Program"; "C:\temp"; "C:\vcredist.exe")