geetools.Asset.Asset.rmdir#

geetools.Asset.Asset.rmdir(recursive=False, dry_run=None)#

Remove the asset folder.

This method will delete a folder asset and all its childrend. by default it is not recursive and will raise an error if the folder is not empty. By setting the recursive argument to True, the method will delete all the children and the folder asset. To avoid deleting important assets by accident the method is set to dry_run by default.

Parameters:
  • recursive (bool) – If True, delete all the children and the folder asset. Defaults to False.

  • dry_run (Optional[bool]) – If True, do not delete the asset simply pass them to the output list. Defaults to True.

Returns:

The list of deleted assets.

Return type:

list

Examples

asset = ee.Asset("projects/ee-geetools/assets/folder")
asset.rmdir(recursive=True)