SplitScript reference / Process / path
Process.path
Method
Process.path() -> String!
Returns the executable's host-provided filesystem path.
The returned value is an absolute path in the runtime's portable, read-only filesystem namespace. Windows paths map by drive, so C:\Games\game.exe becomes /mnt/c/Games/game.exe. Linux and macOS paths gain the /mnt prefix, so /opt/game/game becomes /mnt/opt/game/game. It can be passed directly to File.readAllBytes or File.readAllText. The path is also available while inspecting a candidate in selectProcess.
Effects: allocates, reads process memory, requires an attached process
Runtime behavior: available while a process is attached, except in onDetach; synchronous
Examples
Inspect the attached executable path
let executablePath = process.path() else "Unavailable"