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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6482d0ae6dcb1b4c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-27 03:47:11 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: nma124@hotmail.com (steve_H) Newsgroups: comp.lang.ada Subject: Re: if file exist Date: 27 Sep 2002 03:47:11 -0700 Organization: http://groups.google.com/ Message-ID: <8db3d6c8.0209270247.5bf07ae5@posting.google.com> References: <3d9245da.259420486@news.cis.dfn.de> <3D933A6B.5000105@cogeco.ca> NNTP-Posting-Host: 63.203.198.30 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1033123631 12761 127.0.0.1 (27 Sep 2002 10:47:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 27 Sep 2002 10:47:11 GMT Xref: archiver1.google.com comp.lang.ada:29368 Date: 2002-09-27T10:47:11+00:00 List-Id: Robert A Duff wrote in message news:... > I don't agree that "a general solution is not possible". > A File_Exists return Boolean function makes perfect sense. > Of course it returns False if the file is invisible to the > current process (because it "exists" in an inaccessible directory). > To *this* process, that file does not exist. But the above is not logical. If your function return FALSE, then one does not know if this means the file actually does not exist, or that the function was not able to determine if it exist or not becuase of permission issues. The user might want to know this. You have overloaded the boolean result of FALSE to mean more than one thing. Why not have simply have a function that returns a status code istead of TRUE or FALSE? A status code can have more information in it than just a flag.