MCPcopy
hub / github.com/pimutils/vdirsyncer / create_collection

Method create_collection

vdirsyncer/storage/singlefile.py:82–95  ·  view source on GitHub ↗
(cls, collection, **kwargs)

Source from the content-addressed store, hash-verified

80
81 @classmethod
82 def create_collection(cls, collection, **kwargs):
83 path = os.path.abspath(expand_path(kwargs['path']))
84
85 if collection is not None:
86 try:
87 path = path % (collection,)
88 except TypeError:
89 raise ValueError('Exactly one %s required in path '
90 'if collection is not null.')
91
92 checkfile(path, create=True)
93 kwargs['path'] = path
94 kwargs['collection'] = collection
95 return kwargs
96
97 def list(self):
98 self._items = collections.OrderedDict()

Callers

nothing calls this directly

Calls 2

expand_pathFunction · 0.85
checkfileFunction · 0.85

Tested by

no test coverage detected