code: async function renameOrDelete(srcPath, targetPath) {
    if (srcPath === targetPath) {
      return;
    }
    const srcExists = await fs.exists(srcPath);
    if (!srcExists) {
      return;
    }
    const targetExists = await fs.exists(targetPath);
    // if target file exists, then throw
    // because the target file always be renamed first.
    if (targetExists) {
      const err = new Error(`targetFile ${targetPath} exists!!!`);
      throw err;
    }
    await fs.rename(srcPath, targetPath);
  }
docs: rename from srcPath to targetPath, for example foo.log.1 > foo.log.2