From 0f43ce67de72bd511d849c07bd7728c0d6f2e6dd Mon Sep 17 00:00:00 2001 From: Michel Kraemer Date: Sat, 15 Oct 2022 09:45:25 +0200 Subject: [PATCH] Document path and relativePath properties --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 25b9c326..7f294c77 100644 --- a/README.md +++ b/README.md @@ -220,8 +220,8 @@ has been modified on the server since the last download (default: be applied to each source URL before it is downloaded. The action is called with a DownloadDetails object and can modify some aspects of the target file in the destination directory (e.g. the -filename). If only one download source has been given, adding an -eachFile action will make the plugin fail. +filename or relative path). If only one download source has been given, adding +an eachFile action will make the plugin fail. Tip! You may provide Groovy Closures or Kotlin Lambdas to the `src` @@ -373,7 +373,7 @@ DownloadDetails If you specify an [`eachFile`](#general) action, it will be called with an instance of the `DownloadDetails` class, which provides details about a download source and its target file. It can be used to change some aspects of -the target file (e.g. its name). +the target file (e.g. its name or relative path). The `DownloadDetails` class provides the following methods: @@ -384,6 +384,16 @@ The `DownloadDetails` class provides the following methods:
Get the name of the target file
void setName(String)
Set the name of the target file
+
String getPath()
+
Get the path of the target file (including the filename), relative to +download directory
+
void setPath(String)
+
Set the path of the target file (including the filename)
+
RelativePath getRelativePath()
+
Get the path of the target file (including the filename), relative to +download directory
+
void setRelativePath(RelativePath path)
+
Set the path of the target file (including the filename)
Proxy configuration