Retrieval Functions
The purpose of these functions are primarily to retrieve documents within the given (or default) directory.
.find(id)
Retrieves a document based on the document name, or the "id
", and returns the results, parsed and contained in an array. Returns -1
if the document couldn't be found.
.findMore([ids]);
Retrieves multiple documents at the same time based on the identifiers provided in an array. Results are returned in an array, and documents that couldn't be found are returned as -1
.
.get(id);
Retrieves a document based on the internal identifier. Rather than searching for a document name, this function will open and read each file's "id
" key and return the proper document.
.collect();
Retrieves every document in the specified or default directory, parses, and returns an array containing each document and its contents.
Last updated