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

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept