function statSafeSync(filePath) {
  try {
    return fs$2.statSync(filePath);
  } catch (error) {
    /* istanbul ignore next */
    if (error.code !== "ENOENT") {
      throw error;
    }
  }
}
Get stats of a given path.
@param {string} filePath The path to target file.
@returns {fs.Stats | undefined} The stats.