On Wednesday, September 01, 2004, at 08:08AM, Henderson, Jordan (Contractor) (DAASC) 
<[EMAIL PROTECTED]> wrote:
>
>> -----Original Message-----
>> From: Craig A. Berry [mailto:[EMAIL PROTECTED]

>> The POSIX standard says,
>> 
>> "The remove() function causes the file named by the pathname pointed to by
>> path to be no longer accessible by that name. A subsequent attempt to open
>> that file using that name will fail, unless it is created anew.

>> http://www.opengroup.org/onlinepubs/007908799/xsh/remove.html
>> 
>> 
>
>By the above definition, remove(), to be POSIX compliant, would have to remove
>all versions of a VMS file if called without an explicit version number.
>Without that, it fails the "A subsequent attempt to open that file using that
>name will fail, unless it is created anew" condition.

It depends on whether you consider the version number part of the name.  When you say 
remove("foo.bar") you are really saying remove("sys$disk:[]foo.bar;0") where ";0" is 
in turn a stand-in for some actual number, such as ";123". So removing only one 
version does comply with the standard because you will not have another 
sys$disk:[]foo.bar;123 until you create another one.

But what the CRTL does is relevant only to the extent that we need to know what we are 
getting when we use it to implement Perl's unlink.  We could implement it with 
lib$delete_file if we wanted to.  

>As someone pointed out, there is a logical (?) to set just this behavior.

There is now one of the DECC$* logicals that specifies whether or not a version number 
is allowed
in unix syntax file specifications passed to the CRTL, but that's not pertinent here.  
There is a configure-time option to Perl that is not (quite yet) implemented that will 
cause a single unlink call to delete all versions.

Reply via email to