Hi folks,

i have a question about zip-arcives and the archive::zip module.
My work for today is to rename a list of members, but i can't find a good way to do 
this.

I have a list like this ( yes it has numberd names ):
5
4
3
2
1
and a want to chande member 2 into lock_2 for example.

I done this:
        my $member = $zip->memberNamed($item);
        $file = $member->contents();
        $zip->removeMember( $item );
        $newitem = "lock\_$item";
        $zip->addString( $file, $newitem );
        $process = 1;
        while(-e "$INI->{tmpdir}/sd_t_$process\.zip"){
                $process++;
        }
        my $arc = $zip->writeToFileNamed("$INI->{tmpdir}/sd_t_$process\.zip");
        if($arc =! AZ_OK){
                $exception->err(1,"Fehler beim schreiben in das tempor�re\nArchiv
'$INI->{tmpdir}/sd_t_$process\.zip'\n");
                return;
        }
        rename("$INI->{tmpdir}/sd_t_$process\.zip", "$INI-
>{storedir}/$USER/$ident.zip") or $exception->err(1,"Fehler beim �bersiedeln des
Archives");

-----
This is a bay way because i have a new timestamp in the zip now. How can i realise a
renaming of a member whithout changing the file attributes ??? I can't found anything
about renaming in the docs. maybe you have a idea ?
        ( i thougt about writing down a tempfile and change a file attributes befor i
reinsert this file. --- but can i change the file date on my filesystem ? I suppose 
no! - is
there a way to manipulat the data of a member -- maybe i can write the name field on
low-level, anyone has a example ? )

thanx in advance
Kris
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to