1
0
silverbullet/plugos/syscalls/asset.ts

15 lines
336 B
TypeScript
Raw Normal View History

import { SysCallMapping, System } from "../system.ts";
export default function assetSyscalls(system: System<any>): SysCallMapping {
return {
"asset.readAsset": (
ctx,
name: string,
2022-10-12 09:47:13 +00:00
): string => {
return system.loadedPlugs.get(ctx.plug.name!)!.assets!.readFileAsDataUrl(
2022-10-13 13:16:18 +00:00
name,
);
},
};
}