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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ed38969e39db79b8 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Ada95 file management, (Rename, Wildcard) Date: 1998/08/31 Message-ID: <1998Aug31.082728.1@eisner>#1/1 X-Deja-AN: 386415852 X-Nntp-Posting-Host: eisner.decus.org References: <35E522F3.5A8F@ddre.dk> <35EA111C.B03@atlas.otago.ac.nz> <35E8FD6D.28EE@ddre.dk> X-Trace: news.decus.org 904566453 26980 KILGALLEN [192.67.173.2] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1998-08-31T00:00:00+00:00 List-Id: In article <35E8FD6D.28EE@ddre.dk>, Hans Marqvardsen writes: > Dr Richard A. O'Keefe wrote: >> >> Hans Marqvardsen wrote: >> > 1: Is it a fact, that Ada95 has no language-defined procedure allowing >> > you to rename files, or to search for wildcard filenames ? >> >> There are no wildcard facilities in the C89, C++98, Pascal, Fortran > >> Renaming and wildcards are *operating-system* features... > > Guess, that creating or opening files are operating-system features as > well. > Fortunately, these _are_ included in the RM. Creating files mostly requires that the filename syntax be legal -- this can be accomplished by keeping it deadly simple. Even with that, creating files in Ada has this ugly bit known as the Form parameter, which is where all the non-portable stuff is hidden. File ownership, RMS attributes, etc. are all hidden there on a VMS system, making the resulting program quite non-portable. Now consider wildcarding. I bet your OS2 system would not like a a filespec of MY_DEV:[FOO.BAR.][LATEST]FILE.D%T;-0. But putting the whole filespec in the "hide the system-specific part" parameter like Form sort of leaves the Ada Rename call to being one with _no_ standard parameters and _all_ the information carried in the non-portable parameters. The Posix people have a method for those willing to accept least-common-denominator Unix semantics. A wider general capability seems impossible. Larry Kilgallen