Read file from JS process


I know I could do this from a JIT process, but it doesn’t seem to work on Mac with version 3.1.8 due to a missing dependency in the SDK.
So I was wondering if there was an undocumented way to read a text (in my case a .csv) file from a JS process.

Thanks in advance,

yep there’s a way to from Js:)

I’m working on the JIT sdk bug right now

Oops, sorry I missed that …
Thanks a lot @jcelerier, always as fast as usual :slight_smile: ! (and hope you are well BTW)
Cheers !

Hmmm, pretty tricky to get this working in a JS process, all I manage to do is print the content to the console but cannot find a way to get the actual data back into the script … any hints ?
I’m using Device.exec("Util.readFile('" + path + "')");
Sorry if I’m missing something obvious again.

EDIT : nevermind, I will read the docs more in-depth (but hints still welcome)

EDIT2 : Giving up for now, I tried to drop some scripts / modules in the user library and use them from a JS process, but still no luck …
I’m starting to think I’m trying to do things an unintended way, otherwise these functions would be referenced in the JS process section, and the subtitle above wouldn’t say “Writing JS scripts to perform editor actions”, which is not what I’m after.
I’ll wait for the SDK to be fixed on mac :wink: (it seems to be working as expected on windows and linux)