[30 Jan 2008] Exists() has Changed (New Solution Needed)

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
PEB
Posts: 576
Joined: Sun Feb 21, 2010 1:28 am

[30 Jan 2008] Exists() has Changed (New Solution Needed)

Post by PEB »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 30 Jan 2008 23:29:35 -0000

Exists() used to work to determine the existence of a directory; but now (with Hollywood 3.0) it only works for files. So is there a new way to check to see if a directory exists? IsDirectory() doesn't work but comes up with an error if the specified directory does not exist.

I know that I could turn off ExitOnError(), check with IsDirectory(), examine the error code, and then turn ExitOnError() back on again; but is there an easier way?

Thanks,
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[31 Jan 2008] Re: Exists() has Changed (New Solution Needed)

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 31 Jan 2008 22:14:57 +0100
Exists() used to work to determine the existence of a directory; but now (with Hollywood 3.0) it only works for files. So is there a new way to check to see if a directory exists? IsDirectory() doesn't work but comes up with an error if the specified directory does not exist.

I know that I could turn off ExitOnError(), check with IsDirectory(), examine the error code, and then turn ExitOnError() back on again; but is there an easier way?
Hmm, this is a bug of 3.0. It should really work with directories, too. I will fix this in the next version.

Until then, you need to use some workaround.
Locked