How to verify is Directory exists at specific path Magento 2?

Many times you need to verify the current path is a regular directory or not in Magento 2 and if directory exists you need to create a new file or do some custom logic.

But How you can verify this path is a directory or not using
Magento 2, You can verify the given path is the regular directory or not. Continue reading “How to verify is Directory exists at specific path Magento 2?”