File content enumerator
: shell
: file-content-store
: content-enumerator
: /modules/core/content/services/file-content-enumerator.js
fileContentEnumerator
A content enumerator that looks for content files in the site's content folder.
Kind: global variable
fileContentEnumerator.getItemEnumerator(context) ⇒ function
Gets an asynchronous enumerator for all the items in the store.
Kind: static method of fileContentEnumerator
Returns: function - The function that gets the next item. It takes a callback function as its parameter
| Param | Type | Description |
|---|---|---|
| context | object |
The context. |
| context.scope | object |
The scope. |
| [context.idFilter] | RegExp |
A regular expression that validates content item ids before they are read and indexed. |
getItemEnumerator~getNextItem(callback)
Looks for the next item in the store.
Kind: inner method of getItemEnumerator
| Param | Type | Description |
|---|---|---|
| callback | function |
the function that gets called when the item has been fetched. This function takes an error object and the item as its parameters. When all items have been enumerated, the callback is called without parameters. |