note 85781 added to function.rename

From: Date: Wed, 17 Sep 2008 16:26:40 +0000
Subject: note 85781 added to function.rename
Groups: php.notes 
Request: Send a blank email to php-notes+get-144483@lists.php.net to get a copy of this message
In response to treshugart at gmail dot com (06-Feb-2008 02:09) "Apparently rename() will fail on filenames that are too large and emit an E_WARNING." This may not necessarily be php's rename's fault. (well ...) On Windows systems for example you have a file name limit at 255 caracters. Since rename relies on the system's underlying layer, it will fail if that happens, leaving your directory and files 'in limbo' ... (I haven't looked into the details but I don't think rename incorporates a rollback strategy). One could think of other reasons too (rights, etc.), I'm not sure how rename would react then. Hence, as a general rule, when working on folders or sensible data where no rollback support is provided, it is a good idea to always work on a copy. (or make a backup) ---- Server IP: 195.221.21.36 Probable Submitter: 194.153.88.6 ---- Manual Page -- http://www.php.net/manual/en/function.rename.php Edit -- https://master.php.net/note/edit/85781 Del: integrated -- https://master.php.net/note/delete/85781/integrated Del: useless -- https://master.php.net/note/delete/85781/useless Del: bad code -- https://master.php.net/note/delete/85781/bad+code Del: spam -- https://master.php.net/note/delete/85781/spam Del: non-english -- https://master.php.net/note/delete/85781/non-english Del: in docs -- https://master.php.net/note/delete/85781/in+docs Del: other reasons-- https://master.php.net/note/delete/85781 Reject -- https://master.php.net/note/reject/85781 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144483) next »