Explicitely create collections on GET requests

This commit is contained in:
Guillaume Ayoub
2012-02-23 15:28:45 +01:00
parent 128a20714b
commit 22e4e3764c
3 changed files with 16 additions and 5 deletions

View File

@ -284,6 +284,11 @@ class Collection(object):
"""Get the collection properties."""
raise NotImplementedError
@property
def exists(self):
"""``True`` if the collection exists on the storage, else ``False``."""
return self.is_node(self.path) or self.is_leaf(self.path)
@staticmethod
def _parse(text, item_types, name=None):
"""Find items with type in ``item_types`` in ``text``.