# file

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

### Deprecated

Use `getBaseDirectory().file(path)` or `getBaseDirectory().dir(path)` instead.

Creates a file object for the given path, relative to getBaseDirectory.

The reporting base dir can be changed, so users of this method should use it on demand where appropriate.

#### Return

a file object at the given path relative to getBaseDirectory.

#### Since

1.0

#### Parameters

path

the relative path

#### See also

DirectoryProperty