Once a bunch of content has been stored, the next step is often to retrieve the structure or particular folders in order to build menus.
var list = await pn.list("blog");
This returns an array of notes at the given path, as well as useful surrounding pages:
parents
- for breadcrumb trailsparent
- immediate parent foldersiblings
- other notes in the same folderchildren
- if the current path is also a folderSometimes you just want to build a whole tree structure yourself, in which case use getAll()
var all = await pn.getAll();
Which simply returns a flat array of all notes in your database.
Note: all list operations return summary notes (without content) for brevity