path

fun RawArgument.path(mustExist: Boolean = false, canBeFile: Boolean = true, canBeDir: Boolean = true, mustBeWritable: Boolean = false, mustBeReadable: Boolean = false, canBeSymlink: Boolean = true, fileSystem: FileSystem = FileSystems.getDefault()): ProcessedArgument<Path, Path>

Convert the argument to a Path.

Parameters

mustExist

If true, fail if the given path does not exist

canBeFile

If false, fail if the given path is a file

canBeDir

If false, fail if the given path is a directory

mustBeWritable

If true, fail if the given path is not writable

mustBeReadable

If true, fail if the given path is not readable

fileSystem

The FileSystem with which to resolve paths

canBeSymlink

If false, fail if the given path is a symlink

fun RawOption.path(mustExist: Boolean = false, canBeFile: Boolean = true, canBeDir: Boolean = true, mustBeWritable: Boolean = false, mustBeReadable: Boolean = false, canBeSymlink: Boolean = true, fileSystem: FileSystem = FileSystems.getDefault()): NullableOption<Path, Path>

Convert the option to a Path.

Parameters

mustExist

If true, fail if the given path does not exist

canBeFile

If false, fail if the given path is a file

canBeDir

If false, fail if the given path is a directory

mustBeWritable

If true, fail if the given path is not writable

mustBeReadable

If true, fail if the given path is not readable

fileSystem

The FileSystem with which to resolve paths.

canBeSymlink

If false, fail if the given path is a symlink