private function okToDelete(PhingFile $d)
    {
        $list = $d->listDir();
        if ($list === null) {
            return false; // maybe io error?
        }

        foreach ($list as $s) {
            $f = new PhingFile($d, $s);
            if ($f->isDirectory()) {
                if (!$this->okToDelete($f)) {
                    return false;
                }
            } else {
                // found a file
                return false;
            }
        }

        return true;
    }