docs: function isEmptyDir(dir) {
    try {
      return !(fs.readdirSync(dir).length > 0);
    } catch (e) {
      if (e.code === 'ENOENT') {
        // We consider non-existent as empty
        return true;
      }
      throw e;
    }
  }