mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 02:36:04 +10:00
27 lines
785 B
JavaScript
27 lines
785 B
JavaScript
import { createNodeModule } from "../../nodeTypes.js";
|
|
|
|
/**
|
|
* Opens the cartridge folder on the host operating system.
|
|
*/
|
|
export const folderNode = createNodeModule(
|
|
{
|
|
id: "system_folder",
|
|
title: "Open Folder",
|
|
category: "System",
|
|
description: "Open the cartridge folder on the host operating system.",
|
|
searchTags: ["folder", "system", "directory", "open"],
|
|
inputs: [{ id: "exec_in", name: "Exec", direction: "input", kind: "exec" }],
|
|
outputs: [
|
|
{ id: "exec_out", name: "Exec", direction: "output", kind: "exec" },
|
|
],
|
|
properties: [],
|
|
},
|
|
{
|
|
emitExec: ({ indent, indentLevel, emitNextExec }) => {
|
|
const lines = [`${indent(indentLevel)}folder()`];
|
|
lines.push(...emitNextExec("exec_out"));
|
|
return lines;
|
|
},
|
|
}
|
|
);
|