function isDirectory(res) {
  try {
    return fs.statSync(res).isDirectory();
  } catch (e) {
    return false;
  }
}
/**
 * Checks if a given path exists and is a directory.
 * Note: fs.statSync() is used which resolves symlinks.
 */
Checks if a given path exists and is a directory.
Note: fs.statSync() is used which resolves symlinks.
Checks if a given path exists and is a directory . Note : fs . statSync () is used which resolves symlinks .
function isDirectory(res) {
  try {
    return fs.statSync(res).isDirectory();
  } catch (e) {
    return false;
  }
}
function isDirectory ( res ) { try { return fs . statSync ( res ) . isDirectory ( ) ; } catch ( e ) { return false ; } }
Checks if a given path exists and is a directory.
Checks if a given path exists and is a directory .