Skip to main content
static getNoteType(NOTEPath: string): Promise<APIResponse<number>>;
Parameters
ParameterTypeDescription
NOTEPathstringNOTE file path
Returns

Example

import { PluginFileAPI } from 'sn-plugin-lib';

/**
 * Example: get note type.
 */
export async function exampleGetNoteType() {
 const NOTEPath = '/storage/emulated/0/Note/demo.note';
 const res = await PluginFileAPI.getNoteType(NOTEPath);
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getNoteType call failed');
 }
 return res.result;
}