Package io.quarkus.gradle.util
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration for copy and sync operations.static interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.gradle.api.tasks.WorkResultCopies files while preserving their original timestamps.org.gradle.api.tasks.WorkResultdelete(org.gradle.api.Action<? super org.gradle.api.file.DeleteSpec> action) Deletes files and directories.static voiddeleteFileIfExists(Path file) Deletes a file if it exists.protected abstract org.gradle.api.file.FileSystemOperationsgetFs()org.gradle.api.tasks.WorkResultSynchronizes files while preserving their original timestamps.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.services.BuildService
getParameters
-
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
Deletes a file if it exists.- Parameters:
file- the file to delete
-