On Sat, 22 Feb 2003 07:23:20 -0500, you wrote: >Hi, all -- > >How can I tell if a directory is writable? It seems that is_writable >only works on file, and the mode I get out of stat() is [in this case, >anyway] '16895' for a 0777 dir.
The 16895 is in decimal. Use decoct() to convert it to octal and drop the leading digit (which seems to be 4 for directories): $statInfo = stat('./testDir'); $dirMode = substr(decoct($statInfo['mode']), 1); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php