static public function remove($path)
    {
        $returnValue = (bool) false;

        if (is_file($path)) {
            $returnValue = unlink($path);
        } elseif (is_dir($path)) {
            /*
             * //It seems to raise problemes on windows, depending on the php version the resource handler is not freed with DirectoryIterator preventing from further deletions // $iterator = new DirectoryIterator($path); foreach ($iterator as $fileinfo) { if (!$fileinfo->isDot()) { } }
             */
            $handle = opendir($path);
            if ($handle !== false) {
                while (false !== ($entry = readdir($handle))) {
                    if ($entry != "." && $entry != "..") {
                        self::remove($path . DIRECTORY_SEPARATOR . $entry);
                    }
                }
                closedir($handle);
            } else {
                throw new common_exception_Error('"' . $path . '" cannot be opened for removal');
            }

            $returnValue = rmdir($path);
        } else {
            throw new common_exception_Error('"' . $path . '" cannot be removed since it\'s neither a file nor directory');
        }

        return (bool) $returnValue;
    }
static public function remove($path)
    {
        $returnValue = (bool) false;

        if (is_file($path)) {
            $returnValue = unlink($path);
        } elseif (is_dir($path)) {
            /*
             * //It seems to raise problemes on windows, depending on the php version the resource handler is not freed with DirectoryIterator preventing from further deletions // $iterator = new DirectoryIterator($path); foreach ($iterator as $fileinfo) { if (!$fileinfo->isDot()) { } }
             */
            $handle = opendir($path);
            if ($handle !== false) {
                while (false !== ($entry = readdir($handle))) {
                    if ($entry != "." && $entry != "..") {
                        self::remove($path . DIRECTORY_SEPARATOR . $entry);
                    }
                }
                closedir($handle);
            } else {
                throw new common_exception_Error('"' . $path . '" cannot be opened for removal');
            }

            $returnValue = rmdir($path);
        } else {
            throw new common_exception_Error('"' . $path . '" cannot be removed since it\'s neither a file nor directory');
        }

        return (bool) $returnValue;
    }
static public function remove ( $ path ) { $ returnValue = ( bool ) false ; if ( is_file ( $ path ) ) { $ returnValue = unlink ( $ path ) ; } elseif ( is_dir ( $ path ) ) { /*
             * //It seems to raise problemes on windows, depending on the php version the resource handler is not freed with DirectoryIterator preventing from further deletions // $iterator = new DirectoryIterator($path); foreach ($iterator as $fileinfo) { if (!$fileinfo->isDot()) { } }
             */ $ handle = opendir ( $ path ) ; if ( $ handle !== false ) { while ( false !== ( $ entry = readdir ( $ handle ) ) ) { if ( $ entry != "." && $ entry != ".." ) { self :: remove ( $ path . DIRECTORY_SEPARATOR . $ entry ) ; } } closedir ( $ handle ) ; } else { throw new common_exception_Error ( '"' . $ path . '" cannot be opened for removal' ) ; } $ returnValue = rmdir ( $ path ) ; } else { throw new common_exception_Error ( '"' . $ path . '" cannot be removed since it\'s neither a file nor directory' ) ; } return ( bool ) $ returnValue ; }
deletes a file or a direcstory recursively

@access public
@author Lionel Lecaque, <lionel@taotesting.com>
@param string path
@return boolean
deletes a file or a direcstory recursively