Page 1 of 1

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

Posted: Sat Jun 13, 2020 5:31 pm
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,

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

Posted: Sat Jun 13, 2020 5:31 pm
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.