FilesCollection Class
The DocPad files and documents query collection class Extends the DocPad QueryCollection class https://github.com/docpad/docpad/blob/master/src/lib/base.coffee#L91 Used as the query collection class for DocPad files and documents. This differs from standard collections in that it provides backbone.js, noSQL style methods for querying the file system. In DocPad this is the various files that make up a web project. Typically this is the documents, css, script and image files.
Most often a developer will use this class to find (and possibly sort) documents, such as blog posts, by some criteria. posts: ->
Constructor
FilesCollection
()
Methods
fuzzyFindOne
-
data
-
sorting
-
paging
Fuzzy find one Useful for layout searching
Parameters:
-
data
Object -
sorting
Object -
paging
Object
Returns:
the file, if found
initialize
-
attrs
-
[opts={}]
Initialize the collection
Parameters:
-
attrs
Object -
[opts={}]
Object optional
Properties
collection
Object
private
Base Collection for all child collections
model
Object
private
Base Model for all items in this collection