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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b3865482b201579b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news2!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Ada.Directories problems, a summary Reply-To: no to spamers (No@email.given.org) References: <17rohiaha9ome$.1gz45no0bqro2.dlg@40tude.net> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Thu, 01 Jan 2009 20:41:28 GMT NNTP-Posting-Host: 12.65.108.80 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1230842488 12.65.108.80 (Thu, 01 Jan 2009 20:41:28 GMT) NNTP-Posting-Date: Thu, 01 Jan 2009 20:41:28 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:3176 Date: 2009-01-01T20:41:28+00:00 List-Id: 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@40tude.net>, "Dmitry A. Kazakov" 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