public function delete($recursive = false)
    {
        $fs = FileSystem::getFileSystem();
        if ($fs->canDelete($this) !== true) {
            throw new IOException("Cannot delete " . $this->path . "\n");
        }

        $fs->delete($this, $recursive);
    }