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.

path

open fun path(file: File): FilePath(source)

Creates a path for the given file.

Since

1.0


open fun path(file: File, useFileScheme: Boolean): FilePath(source)

Creates a path for the given file.

Since

2.12

Parameters

file

The file to generate a path for

useFileScheme

Whether 'file://' prefixed URI should be used even for JAR files


open fun path(url: String): Path(source)
open fun path(url: String, relPath: String): Path(source)

Creates a path for the given URL.

Since

1.0