Re: How check for "path/file exists"?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Dan:

(that's me, always late)

----- Original Message -----
From: Dan B Moyer <DANMOYER at PRODIGY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, September 04, 2000 1:29 AM
Subject: Re: How check for "path/file exists"?


> --<code>
> integer filethere
>
> filethere = open("c:\\Euphoria\\Win32Lib\\A new Tutorial\\Tutor3.exw","r")
> if filethere != -1 then  -- is a file there
>     close(filethere)
>     Jump_to(
>     -- passing YOUR main window's id:
>     MainWindow,
>    .....etc. etc.....
> <code ends>
>
> Dan
>

Try it the other way round:
  if filethere = -1 then screamforhelp() else processhappily();

or maybe even the Perl way:
  open(file) or die "Someone swiped my file!";

Gerardo E. Brandariz


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu