Re: Ada.Directories problems, a summary




1. OS problem. Name encoding must match OS and file system that being
used. And that may be different between locations or OSs.

2. OS problem, that all programming languages have to deal with.

3. No need. The usage is just as easy as using a Alphanumeric
directory names. And traversing the directory tree is more portable
since more current file system use "." and "..". It is also, easy
to check and skip them while going deeper within a directory tree.
Note, most file search routines understand how to deal with these
two special directories.

4. Another standards OS problem. Drives are not directories in Windows
and DOS. And this includes some embedded OS. Actually most Windows
uses wish that MS would replace the DOS drive letters with "/"
directory structure because of the internet usage of "/".

5. Windows and it's apps designs loves Popups. This is a MS problem
not Ada or GNAT.

6. Another OS problem. If a drive is not ready, is it a "drive not mounted"
or is there a problem with the drive such as a "drive crash". So, this
not useful, in Ada.Directories or any file type package ( Ada.Direct_IO,
Ada.Sequential_IO, or Ada.Text_IO ). The drive should be installed and
mounted before Ada even tries to access any file or directory routine.

Since, most current computers system have CD/DVD and USB ports
that allow Flash or external drives. Ada needs an Ada.OS_Library for
common and standard routines that can handle mounting or hardware
problems. In this package, the program could ask if a drive is
mounted or is the drive working proper. Or the program could
request for a drive aka CD/DVD to be inserted. Of course this would
mean another Windows popup screen.

7. Not a standard concept in all file systems or OSs and may be phase out
completely. For some OS, its a security option (allowing duplicate files
for simple file backup concept, etc), that should be handled by an
Security package. For Windows, the version numbers are used as one
way to allow floppies to use long file names under the MS FAT files
structure. But as flash drives (using FS which uses long file names
structure) replace floppies so it seams that MS will phase out the use
of the version numbers design. Maybe VMS should too.

So, the only thing that you have stated that may alter Ada is the one
that causes an Ada.OS_library package. To determine rather a drive is
mounted or has crashed. And another routine to mount a drive.


In <17rohiaha9ome$.1gz45no0bqro2.dlg@xxxxxxxxxx>, "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> writes:
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)

Any comments?

P.S. Happy New Year!

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

.



Relevant Pages

  • Re: Can you please help me?
    ... External hard drives and flash drives should work fine, as Windows XP has ... original install media. ... Use of the proper recovery ...
    (microsoft.public.windowsxp.general)
  • Make the Most of Your New PC
    ... mint Windows Vista computer this holiday ... the Workgroup name is exactly the same for all the computers in the ... that doesn't support USB 2.0) and low-capacity portable hard drives. ...
    (microsoft.public.windows.vista.general)
  • Re: Problem with XP scheduler?
    ... While it is possible to write a BIOS vector, ... With SATA drives, ... The reason for a lack of malware on Unix, Linux, MAC, etc. is that those ... With 90% of computers running Windows ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Can Only Boot with Boot CD in Drive
    ... install are pointing to the wrong drive, because when you installed the 2nd Windows, THAT became the C: ... When I insert the Recovery disk to re-install windows, it always refers to my drives backwards ... ... Place the drive on which you want to install Windows at the Master position on the Primary IDE controller. ... When you say "Place the drive on which you want to install Windows at the Master position on the Primary IDE controller", I'm not really sure I know how to do that. ...
    (microsoft.public.windowsxp.general)
  • Re: Removable Media when Converting from FAT32 to NTFS
    ... When running Win98 on your FAT32 hard drives, ... Size Limitations in NTFS and FAT File Systems ... Microsoft Windows MVP ...
    (microsoft.public.windows.file_system)