comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada.Directories problems, a summary
Date: Thu, 1 Jan 2009 14:56:05 +0100
Date: 2009-01-01T14:56:10+01:00	[thread overview]
Message-ID: <bqzugy9xnf4x$.1bl3wyiq4xgbd$.dlg@40tude.net> (raw)
In-Reply-To: 17rohiaha9ome$.1gz45no0bqro2.dlg@40tude.net

On Thu, 1 Jan 2009 12:16:55 +0100, Dmitry A. Kazakov wrote:

> After experimenting with Ada.Directories I collected the issues I think
> must be addressed to make Ada.Directories more usable:
> 
> 1. Name encoding. Either String versions should be UTF-8 or else replaced
> with Wide_Wide_String ones.
> 
> 2. Name canonization / comparison functions. Presently it is impossible to
> compare files by names because the same file may have potentially an
> infinite number of names.
> 
> 3. Fake children "." and ".." should have special File_Kind
> (Virtual_Directory_File, for example). Else it is impossible to traverse
> the directory tree in a portable way.
> 
> 4. There should be a variant of Start_Search without the Directory
> parameter, in order to enumerate the roots of the file systems. For
> example, to find drive letters under Windows, network shares, mount points
> etc.
> 
> 5. The behavior of Exists must be specified for the case of mountable
> volumes. Presently GNAT implementation pops a message box under Windows.
> This should be outlawed.
> 
> 6. Is_Mountable / Is_Removable functions should be provided.
> 
> 7. Version number in addition to Containing_Directory, Base_Name and
> Extension. (Files have version numbers under VMS)

8. Containing_Directory need to be clarified / refined. RM A.16 76/2 and
A.16 127/2 seem to contradict each other.

The GNAT implementation of Containing_Directory returns for "foo.txt" the
current folder. A.16 127/2, in my understanding, says that the result
should be Name_Error, since as a path "foo.txt" has no any [= including
"containing"] directory specified. As an external file it surely has one.

Ergo, is Containing_Directory a path operation or an operation on the
external file? [Clearly there should be two operations.]

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2009-01-01 13:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-01 11:16 Ada.Directories problems, a summary Dmitry A. Kazakov
2009-01-01 13:47 ` Ivan Levashew
2009-01-01 14:15   ` Dmitry A. Kazakov
2009-01-02 14:22     ` Ivan Levashew
2009-01-02 14:49       ` Dmitry A. Kazakov
2009-01-02 22:33         ` Colin Paul Gloster
2009-01-03  9:08           ` Dmitry A. Kazakov
2009-01-05 10:01       ` Jean-Pierre Rosen
2009-01-02 22:57     ` Randy Brukardt
2009-01-03  9:39       ` Dmitry A. Kazakov
2009-01-06  1:23         ` Randy Brukardt
2009-01-06 10:41           ` Dmitry A. Kazakov
2009-01-06  1:23         ` Randy Brukardt
2009-01-01 13:56 ` Dmitry A. Kazakov [this message]
2009-01-01 14:05 ` Colin Paul Gloster
2009-01-01 14:29   ` Dmitry A. Kazakov
2009-01-01 20:41 ` anon
2009-01-02 11:22   ` Colin Paul Gloster
2009-01-02 10:22 ` Georg Bauhaus
2009-01-02 11:09   ` Dmitry A. Kazakov
replies disabled

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