From: Jay Freeman (saurik) Date: Mon, 4 Jan 2016 23:14:47 +0000 (-0800) Subject: Add a simple implementation of getcwd for node.js. X-Git-Tag: v0.9.590~58 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/5c9d18fc8afb53b7478f4c7e6ab764c52b465769 Add a simple implementation of getcwd for node.js. --- 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(); })();