Documentation Index
Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
Use this file to discover all available pages before exploring further.
static getFileMachineType(notePath: string): Promise<APIResponse<number>>;
参数
| 参数 | 类型 | 说明 |
|---|
notePath | string | 笔记/mark文件路径 |
返回
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* 获取创建该笔记/批注文件的设备类型示例。
*/
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 调用失败');
}
return res.result;
}