/*!
\static Check if a given directory is writeable
\return TRUE/FALSE
*/
function isWriteable( $dirname )
{
if ( eZSys::osType() != 'win32' ) return is_writable( $dirname );
/* PHP function is_writable() doesn't work correctly on Windows NT descendants.
* So we have to use the following hack on those OSes.
* FIXME: maybe on Win9x we shouldn't do this?
*/
// try to create temporary file
$tmpfname = $dir . eZSys::fileSeparator() . "ezsetup_" . md5( microtime() ) . ".tmp";
if ( !( $fp = @fopen( $tmpfname, "w" ) ) ) return FALSE;