code: function isEmptySync(searchPath) {
      let stat;
      try {
          stat = fs.statSync(searchPath);
      } catch (e) {
          return true;
      }
      if (stat.isDirectory()) {
          const items = fs.readdirSync(searchPath);
          return !items || !items.length;
      }
      return false;
  }
docs: Checks if the path is empty.
  @param {string} searchPath
  @returns {boolean}