Returns
APIResponse<number>:resultis the device type:0=A5,1=A6,2=A6X,3=A5X,4=Nomad,5=Manta
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get the device type that created this note/annotation file.
static getFileMachineType(notePath: string): Promise<APIResponse<number>>;
| Parameter | Type | Description |
|---|---|---|
notePath | string | Note/annotation file path |
APIResponse<number>:
result is the device type: 0=A5, 1=A6, 2=A6X, 3=A5X, 4=Nomad, 5=Mantaimport { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: get the device type that created this note/annotation file.
*/
export async function exampleGetFileMachineType() {
const notePath = '/storage/emulated/0/Note/demo.note';
const res = await PluginFileAPI.getFileMachineType(notePath);
if (!res.success) {
throw new Error(res.error?.message ?? 'getFileMachineType call failed');
}
return res.result;
}