Class FileUtils
java.lang.Object
io.github.intisy.gradle.github.utils.FileUtils
Author: Finn Birich
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyDirectory(Path sourceDir, Path destDir) Copies a directory from the source path to the destination path.static voiddeleteDirectory(Path dir) Deletes a directory and all its contents.static PathReturns the path to the Gradle caches directory,~/.gradle/caches.
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
getGradleHome
Returns the path to the Gradle caches directory,~/.gradle/caches.Callers append their own subdirectory beneath it, for example
githubfor downloaded release assets orgithub-sourcefor source builds.- Returns:
- the path to the Gradle caches directory
-
copyDirectory
Copies a directory from the source path to the destination path.- Parameters:
sourceDir- the path to the source directorydestDir- the path to the destination directory- Throws:
IOException- if an I/O error occurs
-
deleteDirectory
Deletes a directory and all its contents.- Parameters:
dir- the path to the directory to delete- Throws:
IOException- if an I/O error occurs
-