DanielduelD
Denoβ€’3y agoβ€’
2 replies
Danielduel

Read-only FS detection

Hi, I have few deps that by default create cache/log dirs... I can disable it, but the detection itself is unclear.

Is there a better way than
const canWriteToFs = (() => {
  try {
    Deno.mkdirSync("./log", { recursive: true });
    return true;
  }
  catch {
    return false;
  }
})();
Was this page helpful?