check if there is such a directory

I want to check if there is such a directory in path C:\inetpub\wwwroot\Server/views/admin/files/session/starter/14 or not using async await:

So I wrote this:

const fs = require('fs');
const directoryExist = await fs.promises.access(directory);

But the code above doesn't move after the second line ?!!

How can I do such a simple task?



from Recent Questions - Stack Overflow https://ift.tt/31g5j7R
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation