Skip to main content

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 getCurrentFilePath(): Promise<APIResponse<string>>;

Example

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

/**
 * Example: get current file path.
 */
export async function exampleGetCurrentFilePath() {
 const res = await PluginCommAPI.getCurrentFilePath();
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getCurrentFilePath call failed');
 }
 return res.result;
}