note 99655 added to function.ziparchive-unchangeindex

From: Date: Sun, 29 Aug 2010 15:29:36 +0000
Subject: note 99655 added to function.ziparchive-unchangeindex
Groups: php.notes 
Request: Send a blank email to php-notes+get-172144@lists.php.net to get a copy of this message
Consider this example: <?php $zip = new ZipArchive; $zip->open(...); $zip->addFile('path/file', 'foo'); $zip->renameIndex(0, 'bar'); echo $zip->getNameIndex(0); // 'bar' $zip->unchangeIndex(0); echo $zip->getNameIndex(0); // 'false' ?> Unless you call save() in between, the unchangeIndex() call reverts back to the initial state of the archive - where index '0' did not exist. If you called save() after addFile() and then renamed the file, you would be able to revert/undo the name change. ---- Server IP: 69.147.83.197 Probable Submitter: 87.159.103.253 ---- Manual Page -- http://www.php.net/manual/en/function.ziparchive-unchangeindex.php Edit -- https://master.php.net/note/edit/99655 Del: integrated -- https://master.php.net/note/delete/99655/integrated Del: useless -- https://master.php.net/note/delete/99655/useless Del: bad code -- https://master.php.net/note/delete/99655/bad+code Del: spam -- https://master.php.net/note/delete/99655/spam Del: non-english -- https://master.php.net/note/delete/99655/non-english Del: in docs -- https://master.php.net/note/delete/99655/in+docs Del: other reasons-- https://master.php.net/note/delete/99655 Reject -- https://master.php.net/note/reject/99655 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172144) next »