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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7300df8db68b4232,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: more Ada.Directories questions Date: Fri, 1 Apr 2011 05:49:35 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: J4HSNf9Eqj44wTz1J3b8lQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Xref: g2news2.google.com comp.lang.ada:19617 Date: 2011-04-01T05:49:35+00:00 List-Id: Does Ada.Directories.Create_Directory("X"); raise Use_Error if directory X already exists? It seems it should if the system does not support creation of something that already exists. (On Windows at least, mkdir x fails if x already exists.) Ditto if file "X" exists and the system won't allow a file and a directory of the same name. Does "Create" mean "change the state of the file system" or does it mean "arrange that the file system has a certain state"? Create_Directory apparently means the former. Apparently the latter meaning applies to Create_Path, since according to the Rationale, Ada.Directories.Create_Path("X"); does not raise Use_Error, but is a NOP, if directory X exists. So the only reason to use Create_Directory rather than Create_Path is to detect the case where a file or directory of that name already exists, correct? If "???" is an illegal name for a directory, it seems that Create_Path("a/b/???/c"); will raise Name_Error without creating "a/b". Correct?