import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: unlock an encrypted path with a password.
*/
export async function exampleUnlockPathWithPassword() {
const filePath = '/storage/emulated/0/Note/demo.note';
const password = '123456';
const res = await PluginFileAPI.unlockPathWithPassword(filePath, password);
if (!res.success) {
throw new Error(res.error?.message ?? 'unlockPathWithPassword call failed');
}
return res.result;
}