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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6482d0ae6dcb1b4c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-27 11:44:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: if file exist Date: Fri, 27 Sep 2002 13:43:41 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3d9245da.259420486@news.cis.dfn.de> <3D933A6B.5000105@cogeco.ca> <8db3d6c8.0209270247.5bf07ae5@posting.google.com> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:29386 Date: 2002-09-27T13:43:41-05:00 List-Id: steve_H wrote in message <8db3d6c8.0209270247.5bf07ae5@posting.google.com>... >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. That would be a terrible breach of security. Simply that fact that something exists can be used as an attack point or a way to transmit information. To a process that doesn't have permission to a directory, no information whatsover about the file should be available. The point is that "If_Exist" is meaningless by itself. Its meaning depends on permissions and capabilities and probably other stuff that couldn't practically be standardized. Of course, if everyone implemented Ada.Directories, you could use that and figure out whatever interpretation you'd like. Randy.