For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

append

open fun append(path: Path): Path(source)

Appends the supplied path to this path, returning the new path. The resulting path with be absolute or relative based on the path being appended _to_. It makes no difference if the _appended_ path is absolute or relative.

path(':a:b').append(path(':c:d')) == path(':a:b:c:d')
path(':a:b').append(path('c:d')) == path(':a:b:c:d')
path('a:b').append(path(':c:d')) == path('a:b:c:d')
path('a:b').append(path('c:d')) == path('a:b:c:d')

Since

4.0