clikt / com.github.ajalt.clikt.parameters.types / path

path

fun RawArgument.path(fileSystem: FileSystem = FileSystems.getDefault()): ProcessedArgument 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

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 symlinkfun RawArgument.~~path~~(exists: Boolean = false, fileOkay: Boolean = true, folderOkay: Boolean = true, writable: Boolean = false, readable: Boolean = false, fileSystem: FileSystem = FileSystems.getDefault()): ProcessedArgument Deprecated: Parameters have been renamed. All arguments must be called by name to remove this warning.

fun RawOption.~~path~~(exists: Boolean = false, fileOkay: Boolean = true, folderOkay: Boolean = true, writable: Boolean = false, readable: Boolean = false, fileSystem: FileSystem = FileSystems.getDefault()): NullableOption Deprecated: Parameters have been renamed. All arguments must be called by name to remove this warning.

fun RawOption.path(fileSystem: FileSystem = FileSystems.getDefault()): NullableOption 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

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