comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Ada.Directories.Copy_File behavior
Date: Sun, 20 Feb 2011 20:19:02 +0000 (UTC)
Date: 2011-02-20T20:19:02+00:00	[thread overview]
Message-ID: <ijrsvm$es$1@speranza.aioe.org> (raw)
In-Reply-To: 0856cce6-9ebd-4824-a443-537cd1d127a8@l18g2000yqm.googlegroups.com

> > The Windows CopyFile function takes a BOOL parameter bFailIfExists,
> > so is it implementation-defined what Ada.Directories.Copy_File does?
> > That's not very satisfactory.
>
> But I think it's imp-def even without that BOOL.
>
> In practise how many OS are you going to support? You may find that

No, it's how many *compilers* for a single OS are you going to support?


The behavior of Delete_File when the file is already gone, is specified,
so failing to specify the behavior for Copy_File looks like a
straight-forward oversight.

Regarding Delete_File, I wish they had included a "Make_Gone" that would
delete the file, or do nothing if it's already gone.  I prefer coding
to accomplish a certain end, rather than to execute a certain task.
It's also unpleasant to either litter code with
begin
  Ada.Directories.Delete_File(X);
exception
  when Ada.Directories.Name_Error => null;
end;
or to make my own
package My_Improved_Ada_Directories



  reply	other threads:[~2011-02-20 20:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-19 22:37 Ada.Directories.Copy_File behavior tmoran
2011-02-19 23:01 ` Vinzent Hoefler
2011-02-20  0:01   ` tmoran
2011-02-20  0:31     ` Vinzent Hoefler
2011-02-20 11:01     ` Martin
2011-02-20 20:19       ` tmoran [this message]
2011-02-20 20:25         ` Vinzent Hoefler
2011-02-21 18:05   ` Adam Beneschan
2011-02-21 19:26     ` Vinzent Hoefler
2011-02-21 19:41       ` Adam Beneschan
2011-02-21 20:42         ` Vinzent Hoefler
2011-02-26  2:41     ` Randy Brukardt
2011-02-26  3:22       ` Adam Beneschan
2011-03-01  3:17         ` Randy Brukardt
2011-02-26  2:34 ` Randy Brukardt
replies disabled

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