comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: File Management query - LRM unclear
Date: 2000/02/07
Date: 2000-02-07T00:00:00+00:00	[thread overview]
Message-ID: <87nd1o$6t3$1@nnrp1.deja.com> (raw)
In-Reply-To: 87n35g$uuo$1@nnrp1.deja.com

In article <87n35g$uuo$1@nnrp1.deja.com>,
  dommo1234@my-deja.com wrote:

> called, I envoke the (my) function that attempts to open the file, in
> order to obtain the File_Type instance required to call the Ada
> library's Delete(..) primitive. Now comes the query. If the external-
> file is already open, the exception 'Status_Error' gets thrown. That
> *is* clear (LRM A.8.2[8]), but what isn't clear, is whether or not the
> File_Type instance associated with the already-open external file is
> supposed to be returned in the first (in/out) parameter of the Delete
> primitive. If not, how can I obtain it, in order that I may actually
> delete the file?

I think that wasn't specified because...well...because that isn't
specified. You can pretty much assume that the already opened file
object will *not* be returned. The whole point of the error is that
it could not open the file for you. Telling you that, then
proceeding to open the file for you would be a bit silly. That would be
roughtly like a clerk saying, "I'm sorry but I can't give you a salt
bagel because someone has already taken the last one.", and then going
over to that customer, taking their bagel, handing it to you, and saying
"See, here it is."

I'm afraid that the onus is going to have to be on the caller of your
routine to ensure that the file is not open. That may sound like a pain,
but I'd be willing to bet the other customer's salt bagel that your OS's
file deletion command works the same way. :-)

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




      reply	other threads:[~2000-02-07  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-07  0:00 File Management query - LRM unclear dommo1234
2000-02-07  0:00 ` Ted Dennison [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox