Returns
APIResponse<number[]>:resultis the list of page indices that contain five-star elements
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Search a file for five-star elements and return the page indices.
static searchFiveStars(filePath: string): Promise<APIResponse<number[]>>;
| Parameter | Type | Description |
|---|---|---|
filePath | string | NOTE/DOC file path |
APIResponse<number[]>:
result is the list of page indices that contain five-star elementsimport { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: search a file for five-star pages.
*/
export async function exampleSearchFiveStars() {
const filePath = '/storage/emulated/0/Note/demo.note';
const res = await PluginFileAPI.searchFiveStars(filePath);
if (!res.success) {
throw new Error(res.error?.message ?? 'searchFiveStars call failed');
}
return res.result;
}