move_uploaded_file locks?
| From: | Matthew H. North | Date: | Wed, 20 Sep 2006 18:36:34 +0000 |
| Subject: | move_uploaded_file locks? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-241987@lists.php.net to get a copy of this message | ||
Can't find this in the PHP docs, so: does anyone know whether
move_uploaded_file locks the target file during the process?
If move_uploaded_file does a rename within the same filesystem this isn't an
issue (on unix, anyway, the O/S just reassigns inodes rather than copying
data). But if it does a copy instead, or if it has to rename across
filesystems, any process that tries to read or write the file before
move_uploaded_file completes could be munging things.
--
Matthew H. North
mailto:dtlmhn@dtl.net