# addFileOption

open fun addFileOption(option: String): JavadocOptionFileOption<File>(source)

Adds an option that will have an absolute file path supplied as a separate argument. Calling this method behaves exactly like calling `addFileOption(option, null)`.

`addFileOption("foo")` will not produce any arguments.

`addFileOption("foo").setValue(file("bar"))` will produce the command-line

        -foo 'path/to/bar'

Content copied to clipboard

#### Return

an option object to further configure the value

#### Parameters

option

command-line option

open fun addFileOption(option: String, value: File): JavadocOptionFileOption<File>(source)

Adds an option that will have an absolute file path supplied as a separate argument.

`addFileOption("foo", file("bar"))` will produce the command-line

        -foo 'path/to/bar'

Content copied to clipboard

A value of `null` will make the option not be supplied and can be used to unset an option that previously was set.

The returned option object can also be used to further configure the value.

`addFileOption("foo", file("bar")).setValue(file("baz"))` will produce the command-line

        -foo 'path/to/baz'

Content copied to clipboard

#### Return

an option object to further configure the value

#### Parameters

option

command-line option

value

the value to supply or `null` to suppress the option