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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,24a59fbc07128ff8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-09 15:33:19 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!netnews.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: rename missing in Text_IO From: charleshixson@earthling.net (Charles Hixson) References: <9cvdav$8q61@news.cis.okstate.edu> <9da0p9$7hu2@news.cis.okstate.edu> Organization: Mandala Fluteworks Message-ID: User-Agent: Xnews/M3 Date: Wed, 09 May 2001 22:33:18 GMT NNTP-Posting-Host: 198.94.156.19 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 989447598 198.94.156.19 (Wed, 09 May 2001 15:33:18 PDT) NNTP-Posting-Date: Wed, 09 May 2001 15:33:18 PDT X-Received-Date: Wed, 09 May 2001 15:31:42 PDT (newsmaster1.prod.itd.earthlink.net) Xref: newsfeed.google.com comp.lang.ada:7413 Date: 2001-05-09T22:33:18+00:00 List-Id: Fraser Wilson wrote in : >charleshixson@earthling.net (Charles Hixson) writes: > >> But if what we are considering is what an Ada Library >> Package should look like, then there's no reason to copy >> the low level features of an operating system. And the >> semantics of the mv command is generally superior. A >> program should not need to know the details of the disk >> layout. > >The problem is that a rename or move on the same disk is >significantly cheaper than one that crosses disks. It's also >a much safer operation. I think the implementation detail >line is quite fuzzy here. > >More generally, the destination might not even be a disk >filesystem; it could be a remote ftp site or /proc on Linux. >Does a move/rename even make sense in those cases? > >Fraser. > It makes as much sense in those cases as in other read-only cases (unless you have read/write access to the ftp site, in which case I would say, "Yes, it makes sense, but wouldn't copy be a better choice?") I do think that basic characteristics of the file are reasonable to be able to determine, I just don't think that they should be mandatory. Among these characteristics I would include "Is it a local file?", "How big is it?", "Can you write to it?", "Can you seek within it?", "Can you write within it, without destroying everything that follows the write location?", "Who is the owner?", "When was it last changed?", etc. All the standard file status questions. The thing is, to each of these questions, "I don't know." has to be a valid answer. Perhaps it would be an unusual answer, but it needs to be possible. This is what would make a really portable package possible. (It would be trivial to port a package that just answered "I don't know." whatever you asked it. Not particularly useful, but trivial.) What your program should do in response to "I don't know" is less clear. Perhaps it should ask the user? -- Charles Hixson Copy software legally, the GNU way! Use GNU software, and legally make and share copies of software. See http://www.gnu.org http://www.redhat.com http://www.linux-mandrake.com http://www.calderasystems.com/ http://www.linuxapps.com/