code: function getFileString(filepath) {
    if (/(?:\/|\\)$/.test(filepath) || !fs.existsSync(filepath)) {
      console.log("\x1B[31mfile is not exist：" + filepath + "\x1B[0m");
      return null;
    } else {
      return fs.readFileSync(filepath).toString()
    }
  }
docs: 获取文件字符串