note 72427 added to function.is-dir

From: Date: Thu, 18 Jan 2007 13:07:01 +0000
Subject: note 72427 added to function.is-dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-121881@lists.php.net to get a copy of this message
Be aware that is_dir() and is_file() will not work on very large (for me >2gb) files (also see http://de3.php.net/manual/en/function.is-file.php#56334). You might try this approach - it works for me: <?php function isDir($dir) { $cwd = getcwd(); $returnValue = false; if (@chdir($dir)) { chdir($cwd); $returnValue = true; } return $returnValue; } ?> Please keep in mind that isDir() will fail on directories which cannot be chdired due to permission settings for example. ---- Server IP: 217.160.72.57 Probable Submitter: 84.155.4.240 ---- Manual Page -- http://www.php.net/manual/en/function.is-dir.php Edit -- https://master.php.net/note/edit/72427 Del: integrated -- https://master.php.net/note/delete/72427/integrated Del: useless -- https://master.php.net/note/delete/72427/useless Del: bad code -- https://master.php.net/note/delete/72427/bad+code Del: spam -- https://master.php.net/note/delete/72427/spam Del: non-english -- https://master.php.net/note/delete/72427/non-english Del: in docs -- https://master.php.net/note/delete/72427/in+docs Del: other reasons-- https://master.php.net/note/delete/72427 Reject -- https://master.php.net/note/reject/72427 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121881) next »