'Delete file or folder on the datastore.
:param file_path: Datastore path of the file or folder'

def delete_file(self, file_path, datacenter=None):

    LOG.debug('Deleting    file:    %(file)s    under    datacenter:    %(dc)s.', {'file': file_path, 'dc': datacenter})
    fileManager = self._session.vim.service_content.fileManager
    task = self._session.invoke_api(self._session.vim, 'DeleteDatastoreFile_Task', fileManager, name=file_path, datacenter=datacenter)
    LOG.debug('Initiated    deletion    via    task:    %s.', task)
    self._session.wait_for_task(task)
    LOG.info('Successfully    deleted    file:    %s.', file_path)
