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,c72c8726f7de6c9b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news.germany.com!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Mon, 01 Aug 2005 20:18:37 +0200 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: File manipulations in Ada.Text_IO References: <1122919474.611248.151950@z14g2000cwz.googlegroups.com> In-Reply-To: <1122919474.611248.151950@z14g2000cwz.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42ee677a$0$11756$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 01 Aug 2005 20:18:34 MEST NNTP-Posting-Host: 2d09c92c.newsread4.arcor-online.net X-Trace: DXC=JFHafF^dVB]dJbiSCXTQ?5b[UUng9_FXZ=S>:=P9Ihe`BX@Z?dZ]MOidU X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:3878 Date: 2005-08-01T20:18:34+02:00 List-Id: Zheng Wang wrote: > Hi, > > I would like to ask a simple question about Ada.Text_IO, please. > How could we check if a file exists or not? I mean is there a function > or procedure that takes a File_Type/File_Name and returns true if the > File exists, otherwise return false. > Many thanks in advance. > One way using standard Ada is an attempt to open the file. If the external file doesn't exist, exception Name_Error is raised. -- Georg