note 10088 deleted from function.fileperms by aidan

From: Date: Sat, 10 Jul 2004 13:27:52 +0000
Subject: note 10088 deleted from function.fileperms by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73002@lists.php.net to get a copy of this message
Note Submitter: php-general@lists.php.net ---- To correct the really cool function above for determining file type: if(($mode & 0xC000) === 0xC000) // Unix domain socket $type = 's'; elseif(($mode & 0x4000) === 0x4000) // Directory $type = 'd'; elseif(($mode & 0xA000) === 0xA000) // Symbolic link $type = 'l'; elseif(($mode & 0x8000) === 0x8000) // Regular file $type = '-'; elseif(($mode & 0x6000) === 0x6000) // Block special file $type = 'b'; elseif(($mode & 0x2000) === 0x2000) // Character special file $type = 'c'; elseif(($mode & 0x1000) === 0x1000) // Named pipe $type = 'p'; else // Unknown $type = '?';

« previous php.notes (#73002) next »