Class FileUtils
java.lang.Object
io.github.intisy.gradle.inno.utils.FileUtils
File utility helpers for copying, creating, and deleting files and directories.
Provides folder copy, recursive delete, and mkdirs helpers used by the Inno Setup build workflow.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyFolder(Path source, Path target) Recursively copies a folder tree from a source path to a target path.static voidDeletes a file if it exists, throwing a runtime exception on failure.static voiddeleteFolder(Path path) Recursively deletes a folder tree if it exists.static booleanEnsures a directory exists for the provided file (as directory).static booleanEnsures a directory exists for the provided path.
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
copyFolder
Recursively copies a folder tree from a source path to a target path.- Parameters:
source- root folder to copytarget- destination root- Throws:
IOException- if walking or copying fails
-
delete
Deletes a file if it exists, throwing a runtime exception on failure.- Parameters:
file- file to delete
-
mkdirs
Ensures a directory exists for the provided path.- Parameters:
path- directory path to create- Returns:
- true if the directory was created, false if it already existed
-
mkdirs
Ensures a directory exists for the provided file (as directory).- Parameters:
file- directory to create- Returns:
- true if the directory was created, false if it already existed
-
deleteFolder
Recursively deletes a folder tree if it exists.- Parameters:
path- root directory to delete- Throws:
IOException- if deletion fails
-