fs.readdir permission denied to read directory, but I can read files from directory
const fs = require("fs");
const paths = fs.readdirSync("test");
console.log(paths);above gives the error: "Permission denied to read directory. Engine: UXPScript File: I (uxp://uxp-internal/webfs-scripts.js)"
The below works fine:
const fs = require("fs");
let txt = fs.readFileSync("test\\test.txt", {encoding: "utf-8"});
console.log(txt);lstatSync gives [console] {"_info":{"isFile":false,"isDirectory":true}}
Giving it all possible permissions, and opening InDesign as admin didn't help.
I'm on Windows 10 Pro
Is there any other way to grep the content of the directory?
