Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions geetools/ee_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,20 @@ def is_folder(self, raised: bool = False) -> bool:
"""
return self.is_type("FOLDER", raised)

def is_container(self, raised: bool = True) -> bool:
"""Return ``True`` if the asset is a container object.

Args:
raised: If True, raise an exception if the asset is not a folder. Defaults to False.

Examples:
.. code-block:: python

asset = ee.Asset("projects/ee-geetools/assets/folder")
asset.is_container()
"""
return asset.is_project(raised) or asset.is_folder(raised) or asset.is_image_collection(raised)

@property
def type(self) -> str:
"""Return the asset type.
Expand Down
Loading