code: public static void writeBuildDataFile(FilePath ws, String buildNumber, BuildDataFile buildDataFile, Log logger) throws Exception {
          createAndGetTempDir(ws).act(new CreateBuildDataFileCallable(buildNumber, buildDataFile, logger));
      }
docs: Create pipeline build data in @tmp/artifactory-pipeline-cache/build-number directory.
  Used to transfer data between different steps in declarative pipelines.
  
  @param ws            - The agent workspace.
  @param buildNumber   - The build number.
  @param buildDataFile - The build data file to save.
  @throws Exception - In case of no write permissions.