Skip to main content
static searchFiveStars(filePath: string): Promise<APIResponse<number[]>>;
Parameters
ParameterTypeDescription
filePathstringNOTE/DOC file path
Returns

Example

import { 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;
}