note 87603 added to function.stat
| From: | digitalaudiorock at hotmail dot com | Date: | Fri, 12 Dec 2008 16:23:51 +0000 |
| Subject: | note 87603 added to function.stat | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148079@lists.php.net to get a copy of this message | ||
Regarding the stat() on files larger than 2GB on 32 bit systems not working, note that the behavior
appears to differ between Linux and Windows. Under Windows there's so way to know whether or
not this failed.
It's been my experience that under Linux, performing a stat() on files that are too large for
the integer size generates a warning and returns false. However under Windows it silently truncates
the high order bits of the size resulting in an incorrect number. The only way you'd ever know
it failed is in the event that the truncation happened to leave the sign bit on resulting in a
negative size. That is, there is _no_ reliable way to know it failed.
This is true of filesize() as well.
Tom
----
Server IP: 209.41.74.194
Probable Submitter: 68.192.147.236
----
Manual Page -- http://www.php.net/manual/en/function.stat.php
Edit -- https://master.php.net/note/edit/87603
Del: integrated -- https://master.php.net/note/delete/87603/integrated
Del: useless -- https://master.php.net/note/delete/87603/useless
Del: bad code -- https://master.php.net/note/delete/87603/bad+code
Del: spam -- https://master.php.net/note/delete/87603/spam
Del: non-english -- https://master.php.net/note/delete/87603/non-english
Del: in docs -- https://master.php.net/note/delete/87603/in+docs
Del: other reasons-- https://master.php.net/note/delete/87603
Reject -- https://master.php.net/note/reject/87603
Search -- https://master.php.net/manage/user-notes.php