#How to test if a file was created?
1 messages · Page 1 of 1 (latest)
try {
await Deno.open("/path_to_file");
} catch (error) {
if (error instanceof Deno.errors.NotFound) throw error;
}
Deno.mkdir will throw an error if it fails to create a directory. Including if the directory already exists.
do i just plop this in my test file or what?