function purge( $printCallback = false, $microsleep = false, $max = false, $expiry = false )
    {
        eZDebugSetting::writeDebug( 'kernel-clustering', "dfs::purge( '$this->filePath' )" );

        $file = $this->filePath;
        if ( $max === false )
        {
            $max = 100;
        }
        $count = 0;
        /**
         * The loop starts without knowing how many files are to be deleted.
         * When _purgeByLike is called, it returns the number of affected rows.
         * If rows were affected, _purgeByLike will be called again
         */
        do
        {
            // @todo this won't work on windows, make a wrapper that uses
            //       either usleep or sleep depending on the OS
            if ( $count > 0 && $microsleep )
            {
                usleep( $microsleep ); // Sleep a bit to make the database happier
            }
            $count = self::$dbbackend->_purgeByLike( $file . "/%", true, $max, $expiry, 'purge' );
            self::$dbbackend->_purge( $file, true, $expiry, 'purge' );
            if ( $printCallback )
            {
                call_user_func_array( $printCallback, array( $file, $count ) );
            }

            // @todo Compare $count to $max. If $count < $max, no more files are to
            // be purged, and we can exit the loop
        } while ( $count > 0 );

        // Remove local copies
        if ( is_file( $file ) )
        {
            @unlink( $file );
        }
        elseif ( is_dir( $file ) )
        {
            eZDir::recursiveDelete( $file );
        }

        eZClusterFileHandler::cleanupEmptyDirectories( $file );
    }