comp.lang.ada
 help / color / mirror / Atom feed
* Yet another problem with Ada.Directories
@ 2007-11-26 14:10 Dmitry A. Kazakov
  2007-11-27  2:07 ` Randy Brukardt
  2007-11-27  7:11 ` Larry Kilgallen
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry A. Kazakov @ 2007-11-26 14:10 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-20 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-26 14:10 Yet another problem with Ada.Directories Dmitry A. Kazakov
2007-11-27  2:07 ` Randy Brukardt
2007-11-27  7:11 ` Larry Kilgallen
2007-12-20 10:37   ` I. Levashew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox