Home > @magiclane/maps-sdk > RouteBookmarks > createInFolder
RouteBookmarks.createInFolder() method
Open or create a bookmarks collection with the provided name and folder path.
The factory creates or opens the underlying bookmarks database for the given name and folderPath and returns a RouteBookmarks instance that operates on that collection.
Signature:
static createInFolder(name: string, folderPath?: string): RouteBookmarks | null;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
string |
The name (path) of the bookmarks collection to open or create. |
|
folderPath |
string |
(Optional) Optional folder absolute path where the bookmarks collection file is stored. Folder needs to exist in the app root directory before calling this method. |
Returns:
RouteBookmarks | null
A new RouteBookmarks instance on success, or null if creation failed (invalid folder path or lack of write permissions).