From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7eef1e530c6ffb21 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: procedure Make_File_Gone (Name : in String); Date: Fri, 22 Jul 2011 18:44:06 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1311378248 23575 69.95.181.76 (22 Jul 2011 23:44:08 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 22 Jul 2011 23:44:08 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: g2news2.google.com comp.lang.ada:21272 Date: 2011-07-22T18:44:06-05:00 List-Id: wrote in message news:j05r52$1h8$1@speranza.aioe.org... > What's a good name for a procedure that does an > Ada.Directories.Delete_File if the file exists, and silently returns if > the file is already gone. I'm of course partial to Purge for this use. :-) [Background to the uninitiated: I had suggested to Tom and other Janus/Ada customers that they consider using Ada.Directories operations rather than the implementation-defined ones in Ada.Text_IO.Extensions as those are more portable; specifically replacing Ada.Text_IO.Extensions.Purge with Ada.Directories.Delete_File. Tom had followed that advice, except that it was causing random failures to his application -- which eventually turned out to be caused by the different behavior of Purge (do nothing) and Delete_File (raise an exception) if the file does not exist.] Randy.