Skip to main content

Home > git-documentdb > Collection > collection

Collection.collection() method#

Get a collection

Signature:
collection(collectionPath: CollectionPath, options?: CollectionOptions): ICollection;

Parameters#

ParameterTypeDescription
collectionPathCollectionPathrelative path from this.collectionPath. Sub-directories are also permitted. e.g. 'pages', 'pages/works'.
optionsCollectionOptions
Returns:

ICollection

A child collection of this collection

Remarks#

  • Notice that this function just read an existing directory. It does not make a new sub-directory.