note 10088 added to fileperms

From: Date: Tue, 12 Dec 2000 23:07:45 +0000
Subject: note 10088 added to fileperms
Groups: php.notes 
Request: Send a blank email to php-notes+get-8657@lists.php.net to get a copy of this message
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 = '?'; http://www.php.net/manual/function.fileperms.php

« previous php.notes (#8657) next »