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,a9a7b6e1937d4bda X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Yet another problem with Ada.Directories Date: Mon, 26 Nov 2007 20:07:25 -0600 Organization: Jacob's private Usenet server Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1196129033 22968 69.95.181.76 (27 Nov 2007 02:03:53 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 27 Nov 2007 02:03:53 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:18642 Date: 2007-11-26T20:07:25-06:00 List-Id: I have an action item to address various perceived shortcomings of the Ada.Directories package. If you want additional issues to be considered, you need to post your ideas to the Ada-Comment mailing list, so that they get considered. I know that case sensitivity is one issue that is explicitly covered by the (empty) AI. ARG discussion pointed out that the primary purpose of Ada.Directories is to make it reasonable to portably construct new file names out of parts of others (comparisons of existing names were not a goal). But even that needs some knowledge of case sensitivity (you don't want to construct names differing only by case on Windows). In one sense, there is no solution needed: portable applications can always construct names that differ by more than just case, and that will work on all systems (that I know of). In any case, file name processing is a very complex area, and one that cannot be handled (completely) by simplistic solutions (like the one in Ada.Directories). Comparisons would have to deal with Unicode file names, for instance. Randy. "Dmitry A. Kazakov" wrote in message news:tifgjrvt4uik$.sf4ffwrghzp3.dlg@40tude.net... > Some operating systems have case-insensitive file names. The problem is > that Ada.Directories does not define file name/path comparisons. Comparing > names as strings is necessarily OS-dependent. > > (Actually making Simple_Name, Base_Name, Full_Name the same string type > does not look much in Ada way (TM). I would make all them new-String with > comparison overridden.) > > ------------------------ > P.S. In the current GNAT implementation for Windows there is a trick to > compare names properly. That is to pass all file names through > Get_Directory / Simple_Name -> Compose before doing String comparison. That > would make them lower-case. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de