At 4:30 PM -0800 1/27/04, Michael G Schwern wrote:
> > The more serious problem is that the code does not handle file multiversions.
>> How can I get File::Find to see them.
>
>The classic way around this is:  "1 while unlink $file;" which deletes each
>version until they're all gone.  rmtree() will do the moral equivalent of
>this for you.

If the only reason you want all the versions is to make sure you
delete them all, then these will do nicely.  If you want all the
versions for some other reason, we don't currently provide a way to
get at them.  There is latent support for an attribute of the
directory handle returned by our readdir() implementation that allows
you to choose whether or not you want all versions of a file, but
there are currently no hooks for getting at this from Perl.  Look for
vmsreaddirversions() and collectversions in [.vms]vms.c in the Perl
sources.  I believe these were included in a readdir implementation
that was simply brought wholesale into Perl but the version functions
were never made visible.

It's not immediately obvious to me what the best interface would be
if we want to expose this capability.  We could propose adding a
function to Perl or perhaps put it in a new or existing XS namespace.
Wherever it goes, I'm not fond of vmsreaddirversions; perhaps
readdir_all_versions.
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to