Class CustomFileSystemOperations

java.lang.Object
io.quarkus.gradle.util.CustomFileSystemOperations
All Implemented Interfaces:
org.gradle.api.services.BuildService<org.gradle.api.services.BuildServiceParameters.None>

public abstract class CustomFileSystemOperations extends Object implements org.gradle.api.services.BuildService<org.gradle.api.services.BuildServiceParameters.None>
Gradle build service providing file system operations with timestamp preservation.
  • Constructor Details

    • CustomFileSystemOperations

      public CustomFileSystemOperations()
  • Method Details

    • getFs

      @Inject protected abstract org.gradle.api.file.FileSystemOperations getFs()
    • copyPreservingTimestamps

      public org.gradle.api.tasks.WorkResult copyPreservingTimestamps(CustomFileSystemOperations.CopySyncConfigurationCustomizer customizer)
      Copies files while preserving their original timestamps.
      Parameters:
      customizer - configuration customizer
      Returns:
      the result of the copy operation
    • syncPreservingTimestamps

      public org.gradle.api.tasks.WorkResult syncPreservingTimestamps(CustomFileSystemOperations.CopySyncConfigurationCustomizer customizer)
      Synchronizes files while preserving their original timestamps.
      Parameters:
      customizer - configuration customizer
      Returns:
      the result of the sync operation
    • delete

      public org.gradle.api.tasks.WorkResult delete(org.gradle.api.Action<? super org.gradle.api.file.DeleteSpec> action)
      Deletes files and directories.
      Parameters:
      action - the delete action configuration
      Returns:
      the result of the delete operation
    • deleteFileIfExists

      public static void deleteFileIfExists(Path file)
      Deletes a file if it exists.
      Parameters:
      file - the file to delete