Deno.readDir on current script even if used like an http package.
Hello !! I would like to do Deno.readDir and readFiles on files relative to the script that execute Deno.readDir even if the script lives in deno.land/x. How should I do it ? Any help is welcomed thank you.
1 Reply
This might help: https://deno.land/api@v1.33.4?s=Location#prop_pathname
Deno
Location | Runtime APIs | Deno
The location (URL) of the object it is linked to. Changes done on it are
reflected on the object it relates to. Accessible via
globalThis.location
.