From: "Chad R. Meiners" <crmeiners@hotmail.com>
Subject: Re: how to validate if a file exist ?
Date: Sun, 22 Sep 2002 17:12:33 -0400
Date: 2002-09-22T17:12:33-04:00 [thread overview]
Message-ID: <amlbqs$p75$1@msunews.cl.msu.edu> (raw)
In-Reply-To: mailman.1032719103.21393.comp.lang.ada@ada.eu.org
begin
Open (...);
-- file exists and is open
Close (...);
exception
when name_error =>
-- file does not exist.
end;
You have two paths here so if you don't end up handling the exception the
file exists, right?
Please note that you shouldn't expect an exception for the existence of a
file. If you are taking a class, should discuss this with your instructor;
you seem to misunderstand how the exception mechanism is meant to be used.
"Dominic D'Apice" <dapiced@sympatico.ca> wrote in message
news:mailman.1032719103.21393.comp.lang.ada@ada.eu.org...
Hi all,
I know that i can validate if a file don't exist with this :
---------------------------------------------------
exception when ada.text_io.name_error =>
ada.text_io.put("file not found");
ada.text_io.skip_line;
---------------------------------------------------
BUT, HOW CAN I VALIDATE IF A FILE EXIST ?
(I did not found any exception about this way.)
thank to reply
Dominic
next prev parent reply other threads:[~2002-09-22 21:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-22 18:25 how to validate if a file exist ? Dominic D'Apice
2002-09-22 21:12 ` Chad R. Meiners [this message]
[not found] <000101c26265$622bc5d0$0101a8c0@dominic>
2002-09-22 20:05 ` sk
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox