Forum Discussion

KSQian's avatar
KSQian
Contributor
8 years ago
Solved

Path of included file

So I have 2 projects and they share some common code.

 

Project1 is C:\Project1\one.pjs. It has a script file projOneLib.js

Project2 is C:\Project2\two.pjs. It has 2 script files. One is projTwoLib.js, but I also included the script file from Project1, projOneLib.js.

 

Now, while running Project2, I need the location of projOneLib.js' path. How would I do that? I need a way to say, grab me the original file location of projOneLib.js. 

 

This can't be too hard-coded either, so in projOneLib.js, if I can save its own file location to a in-memory variable, that'd be good.

 

Thanks!