From 5c9d18fc8afb53b7478f4c7e6ab764c52b465769 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 4 Jan 2016 15:14:47 -0800 Subject: [PATCH] Add a simple implementation of getcwd for node.js. --- libcycript.cy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libcycript.cy b/libcycript.cy index 6f5ac20..6f798ea 100644 --- a/libcycript.cy +++ b/libcycript.cy @@ -397,6 +397,11 @@ for (let i = 0; environ[i] != null; ++i) { process.env[name.toString()] = value; } +process.cwd = function() { + let cwd = new (typedef char[1024]); + return getcwd(cwd, cwd.length).toString(); +}; + process.pid = getpid(); })(); -- 2.47.2