Skip to content

Commit 0f43ce6

Browse files
Document path and relativePath properties
1 parent a8504f9 commit 0f43ce6

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ has been modified on the server since the last download <em>(default:
220220
be applied to each source URL before it is downloaded. The action is called
221221
with a <a href="#downloaddetails">DownloadDetails</a> object and can modify
222222
some aspects of the target file in the destination directory (e.g. the
223-
filename). If only one download source has been given, adding an
224-
<code>eachFile</code> action will make the plugin fail.</dd>
223+
filename or relative path). If only one download source has been given, adding
224+
an <code>eachFile</code> action will make the plugin fail.</dd>
225225
</dl>
226226

227227
<em>Tip!</em> You may provide Groovy Closures or Kotlin Lambdas to the `src`
@@ -373,7 +373,7 @@ DownloadDetails
373373
If you specify an [`eachFile`](#general) action, it will be called with an
374374
instance of the `DownloadDetails` class, which provides details about a
375375
download source and its target file. It can be used to change some aspects of
376-
the target file (e.g. its name).
376+
the target file (e.g. its name or relative path).
377377

378378
The `DownloadDetails` class provides the following methods:
379379

@@ -384,6 +384,16 @@ The `DownloadDetails` class provides the following methods:
384384
<dd>Get the name of the target file</dd>
385385
<dt>void setName(String)</dt>
386386
<dd>Set the name of the target file</dd>
387+
<dt>String getPath()</dt>
388+
<dd>Get the path of the target file (including the filename), relative to
389+
download directory</dd>
390+
<dt>void setPath(String)</dt>
391+
<dd>Set the path of the target file (including the filename)</dd>
392+
<dt><a href="https://docs.gradle.org/current/javadoc/org/gradle/api/file/RelativePath.html">RelativePath</a> getRelativePath()</dt>
393+
<dd>Get the path of the target file (including the filename), relative to
394+
download directory</dd>
395+
<dt>void setRelativePath(<a href="https://docs.gradle.org/current/javadoc/org/gradle/api/file/RelativePath.html">RelativePath</a> path)</dt>
396+
<dd>Set the path of the target file (including the filename)</dd>
387397
</dl>
388398

389399
Proxy configuration

0 commit comments

Comments
 (0)